feat: Add Logos page, refactor Testimonials to RelationManager, and improve designs
This commit is contained in:
@@ -80,6 +80,11 @@ class Page extends Model
|
||||
return $this->hasMany(Page::class, 'parent_id');
|
||||
}
|
||||
|
||||
public function testimonials()
|
||||
{
|
||||
return $this->hasMany(Testimonial::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the header template for the page.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Testimonial extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'page_id',
|
||||
'name',
|
||||
'position',
|
||||
'content',
|
||||
'rating',
|
||||
'avatar',
|
||||
'is_active',
|
||||
'sort_order',
|
||||
];
|
||||
|
||||
public function page()
|
||||
{
|
||||
return $this->belongsTo(Page::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user