jeremykenedy / laravel-users

A Users Management Package that includes all necessary routes, views, models, and controllers for a user management dashboard and associated pages for managing Laravels built in user scaffolding. Built for Laravel 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6.0, 7.0 and 8.0.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to render the blade file in the /resources/views/vendor/laravelusers/usersmanagement folder

quocanh261997 opened this issue · comments

Hi, somehow, when I try to render these blade files, it's saying that a variable that's called "rolesEnabled" not defined, and so returning errors. Is there documentation somewhere saying:

  1. What are the necessary fields needed to render these fields
  2. What values and from what sources are we getting those values for those above fields to render the blade file

Thank you very much!!

You need to publish the config and set the env variables to use it not use the separate roles package

I've already published the config, and it's already showing the laravelusers.php in config folder, but it's still showing the error

I don’t know, i cannot replicate the issue

Do I need to run php artisan vendor:publish --tag=laravelusers everytime I change something in the laravelusers.php file? The way that I'm rendering the create-user.blade.php file is by defining this route:

Route::get('/create-user', function() {
    return view('vendor.laravelusers.usersmanagement.create-user');
});

You shouldn’t need to. All those settings have been ported to env variables.

If you have your configs cached you may need to clear that.

They you are implementing it not as it’s intended design and some data may be missing.

You have to use the built in routes and if you want to use that route you may need to create a redirect to the correct route.

Trying to go to the view directly with a closure will not work. It needs to run through the controller and attach the needed data.

https://github.com/jeremykenedy/laravel-users/blob/master/src/App/Http/Controllers/UsersManagementController.php#L67

Where are the built in routes implemented? I don't see it anywhere in the folder after installing the package