forked from metin2/web
Localized and coded character listing, view structure refactoring
This commit is contained in:
19
app/Http/Controllers/User/CharactersController.php
Normal file
19
app/Http/Controllers/User/CharactersController.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\User;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Game\Player\Player;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class CharactersController extends Controller
|
||||
{
|
||||
public function show(): View
|
||||
{
|
||||
$characters = Player::where('account_id', Auth::user()->id)->get();
|
||||
return view('user/characters', [
|
||||
'characters' => $characters
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user