Prepare modules
This commit is contained in:
32
Models/FaqCategory.php
Normal file
32
Models/FaqCategory.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\VuexyWebsiteAdmin\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class FaqCategory extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'icon',
|
||||
'order',
|
||||
'is_active',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'order' => 'integer',
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
|
||||
/**
|
||||
* FAQs asociadas a esta categoría.
|
||||
*/
|
||||
public function faqs(): HasMany
|
||||
{
|
||||
return $this->hasMany(Faq::class, 'category_id');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user