From f46062a9c4e2352ceb7d59270d17cce01614e2fd Mon Sep 17 00:00:00 2001 From: Neerholt Date: Tue, 30 Jun 2020 12:08:31 +0200 Subject: [PATCH] Made it so roles data --- skolehjem/app/Http/Controllers/UserController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/skolehjem/app/Http/Controllers/UserController.php b/skolehjem/app/Http/Controllers/UserController.php index f84a7cf..783de73 100644 --- a/skolehjem/app/Http/Controllers/UserController.php +++ b/skolehjem/app/Http/Controllers/UserController.php @@ -8,6 +8,7 @@ use Illuminate\Http\Response; use App\User; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Log; +use Spatie\Permission\Models\Role; class UserController extends Controller @@ -44,7 +45,9 @@ class UserController extends Controller */ public function create() { - return Response::detect("users.create"); + $roles = Role::all(); + return Response::detect("users.create", ['roles' => $roles]); + } /**