You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
459 B
PHTML

<?php
namespace App\Models;
1 year ago
use Illuminate\Database\Eloquent\Casts\Attribute;
class Banner extends Model
{
protected $fillable = [
'image',
'title',
'description',
'destination',
'type',
];
1 year ago
protected $appends = [
'image_url',
1 year ago
];
protected function imageUrl(): Attribute
{
return Attribute::make(get: function () {
return asset($this->image);
});
}
}