mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
feat: icon list + search functionality
This commit is contained in:
37
app/Models/SummonerIcon.php
Normal file
37
app/Models/SummonerIcon.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SummonerIcon extends Model
|
||||
{
|
||||
use Sluggable;
|
||||
|
||||
protected $fillable = [
|
||||
'icon_id',
|
||||
'title',
|
||||
'description',
|
||||
'release_year',
|
||||
'legacy',
|
||||
'image',
|
||||
'esports_team',
|
||||
'esports_region',
|
||||
'esports_event',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'legacy' => 'boolean',
|
||||
];
|
||||
|
||||
public function sluggable(): array
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => ['title', 'icon_id'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user