mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-20 17:51:09 -05:00
feat: add middleware for cookie encryption, CSRF verification, string trimming, and maintenance request prevention; implement Designer resource management with CRUD pages and permissions
This commit is contained in:
@@ -2,26 +2,27 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\HasSlugHistory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Designer extends Model
|
||||
{
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
use HasSlugHistory;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug',
|
||||
'bio',
|
||||
'description',
|
||||
'website',
|
||||
'founded_date',
|
||||
'headquarters',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'founded_date' => 'date',
|
||||
];
|
||||
|
||||
/**
|
||||
* Boot the model.
|
||||
*/
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
@@ -32,11 +33,8 @@ class Designer extends Model
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the rides designed by this designer.
|
||||
*/
|
||||
public function rides(): HasMany
|
||||
|
||||
public function rides()
|
||||
{
|
||||
return $this->hasMany(Ride::class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user