classify admin
This commit is contained in:
31
app/Models/PackageCategory.php
Normal file
31
app/Models/PackageCategory.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PackageCategory extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $hidden = ['created_at', 'updated_at'];
|
||||
|
||||
protected $fillable = [
|
||||
'category_id',
|
||||
'package_id'
|
||||
];
|
||||
|
||||
public function package()
|
||||
{
|
||||
return $this->belongsTo(Package::class);
|
||||
}
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(Category::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user