Made it so roles data

This commit is contained in:
Neerholt 2020-06-30 12:08:31 +02:00
parent e5493e1888
commit f46062a9c4
1 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ use Illuminate\Http\Response;
use App\User; use App\User;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Spatie\Permission\Models\Role;
class UserController extends Controller class UserController extends Controller
@ -44,7 +45,9 @@ class UserController extends Controller
*/ */
public function create() public function create()
{ {
return Response::detect("users.create"); $roles = Role::all();
return Response::detect("users.create", ['roles' => $roles]);
} }
/** /**