Pint
This commit is contained in:
@@ -2,19 +2,18 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Conner\Tagging\Taggable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Spatie\Sitemap\Contracts\Sitemapable;
|
||||
use Spatie\Sitemap\Tags\Url;
|
||||
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Conner\Tagging\Taggable;
|
||||
|
||||
class Hentai extends Model implements Sitemapable
|
||||
{
|
||||
use Taggable;
|
||||
use HasFactory;
|
||||
use Taggable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
@@ -31,7 +30,7 @@ class Hentai extends Model implements Sitemapable
|
||||
return $this->hasMany(Episode::class, 'hentai_id');
|
||||
}
|
||||
|
||||
public function title(): String
|
||||
public function title(): string
|
||||
{
|
||||
return $this->episodes->first()->title;
|
||||
}
|
||||
@@ -63,7 +62,7 @@ class Hentai extends Model implements Sitemapable
|
||||
);
|
||||
}
|
||||
|
||||
public function toSitemapTag(): Url | string | array
|
||||
public function toSitemapTag(): Url|string|array
|
||||
{
|
||||
return Url::create(route('hentai.index', $this->slug))
|
||||
->setLastModificationDate(Carbon::create($this->created_at));
|
||||
|
||||
Reference in New Issue
Block a user