19 lines
384 B
PHP
19 lines
384 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use App\Models\Category;
|
||
|
|
|
||
|
|
class CompanyCategory extends Model
|
||
|
|
{
|
||
|
|
use HasFactory;
|
||
|
|
|
||
|
|
protected $fillable = ['companies_id','categories_id'];
|
||
|
|
|
||
|
|
public function category(){
|
||
|
|
return $this->hasMany(Category::class,'id','categories_id');
|
||
|
|
}
|
||
|
|
}
|