mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
feat: summoner icon show
This commit is contained in:
@@ -39,7 +39,9 @@ class SummonerIconController extends Controller
|
||||
|
||||
public function show(SummonerIcon $summonerIcon)
|
||||
{
|
||||
return $summonerIcon;
|
||||
$icon = $summonerIcon;
|
||||
|
||||
return view('icons.show', compact('icon'));
|
||||
}
|
||||
|
||||
public function update(Request $request, SummonerIcon $summonerIcon)
|
||||
|
||||
@@ -40,4 +40,9 @@ class SummonerIcon extends Model
|
||||
$sqids = new Sqids(minLength: 5);
|
||||
return $sqids->encode([$this->icon_id]);
|
||||
}
|
||||
|
||||
public function getRouteKeyName(): string
|
||||
{
|
||||
return 'slug';
|
||||
}
|
||||
}
|
||||
|
||||
19
app/View/Components/Icons/View_grid.php
Normal file
19
app/View/Components/Icons/View_grid.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components\Icons;
|
||||
|
||||
use App\Models\SummonerIcon;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class View_grid extends Component
|
||||
{
|
||||
public function __construct(public SummonerIcon $icon)
|
||||
{
|
||||
}
|
||||
|
||||
public function render(): View
|
||||
{
|
||||
return view('components.icons.view_grid');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user