Viewing: Inspiring.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Cviebrock\EloquentSluggable\Sluggable; use App\Models\Bookmark; class Inspiring extends Model { use HasFactory; use Sluggable; protected $guarded = []; protected $appends = ['cover_image_url']; public function getCoverImageAttribute(){ return url(getImageURL($this->attributes['image_url'])); } public function sluggable(): array { return [ 'slug' => [ 'source' => 'title' ] ]; } public function bookmarks() { return $this->morphMany(Bookmark::class, 'bookmarkable'); } }
Return