role listing
This commit is contained in:
23
app/Http/Controllers/RoleController.php
Normal file
23
app/Http/Controllers/RoleController.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Role;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class RoleController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of roles.
|
||||
*/
|
||||
public function index(): View
|
||||
{
|
||||
$roles = Role::query()
|
||||
->orderBy('name')
|
||||
->get(['id', 'name', 'created_at']);
|
||||
|
||||
return view('role.index', [
|
||||
'roles' => $roles,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user