DEV Community

Cover image for Make a flexible Laravel admin panel in 2 minutes!

Make a flexible Laravel admin panel in 2 minutes!

Reza Amini on November 15, 2020

Have you ever tried to build a complete admin panel in Laravel from zero? It takes lots of energy and time and, you may not like what you have bui...
Collapse
 
achala87 profile image
Achala Arunalu Meddegama • • Edited

Hi. thanks for the lovely admin panel. I'm new to laravel and setup your admin panel on one of my volunteer projects at buildlk.com

there was a question about how to edit the list views but found the solution. The partial blade views were a little mystery :) Thanks the admin dashboard is awesome.

Collapse
 
rezaamini profile image
Reza Amini •

When you try to update the crud config file you have to rerun php artisan panel:crud -f with -f flag to recreate the files.

Collapse
 
bsuchea profile image
BEY Suchea •

How about role and permission ?

Collapse
 
rezaamini profile image
Reza Amini •

We will implement role and permission in new versions!

Collapse
 
deivi7 profile image
David •

How to use a select field from the configuration file?

Collapse
 
rezaamini profile image
Reza Amini •

Hey,
You have to use this syntax :

'ground_name'=> [
    'select' => ['indoor', 'out']
]
Enter fullscreen mode Exit fullscreen mode
Collapse
 
radumro profile image
Radu Martin •

I think that you forgot to create the model and migration for articles ...

Collapse
 
rezaamini profile image
Reza Amini •

Article in this project is just an example
We are not going to create an article section

Collapse
 
tayfnour profile image
M.Hassane • • Edited

How to overwrite crud?

Collapse
 
rezaamini profile image
Reza Amini •

What do you mean by "overwriting CRUD"?

Collapse
 
codepiter profile image
Pedro Sanchez •

ups i stayed at step 1:
$ php artisan panel:config article -m Article

The "-m" option does not exist.

Collapse
 
rezaamini profile image
Reza Amini •

Thanks!
It was edited, in the new version, you don't need to pass -m flag and you have to pass your model name directly.

Collapse
 
indriti1 profile image
Indriti1 •

What is the route for accessing the panel?

Collapse
 
rezaamini profile image
Reza Amini •

The default route is '/admin' but you can change it in the config file

Collapse
 
pk8892411327 profile image
PK8892411327 •

127.0.0.1:8000/admin 404 not found error

Collapse
 
nibirahmed9611 profile image
Nibir Ahmed •

Hey,
Thanks for the admin panel. But the thing is how can I authenticate? I've installed laravel ui. Should it work?

Collapse
 
rezaamini profile image
Reza Amini • • Edited

You have to authenticate user in your project without this panel's feature!
It will check if the is_superuser or anything which has been set in config for logged in user is true then it lets users access to panel.

Collapse
 
jonatemps profile image
jonathan Mupene • • Edited

Why?

PS C:\laragon\www\easyPanel> php artisan panel:config article -m=Article
'article' must be equal to model name

Collapse
 
rezaamini profile image
Reza Amini • • Edited

php artisan panel:config Article
Use this format.