Voyager: is it possible to change the master layout and dashboard??

Created on 4 Jan 2018  路  8Comments  路  Source: the-control-group/voyager

  • Laravel Version: 5.5
  • Voyager Version: 1.0
  • PHP Version:7.0

Description:

i want to implement my design into the admin panel, but i don't know is it possible to override tha master layout and how to change the dashboard

question

Most helpful comment

I wanted to do the same, so here is what you can do:

1) If you want to completely change the dashboard page, you probably want to change the controller as well. Take a look at https://voyager.readme.io/docs/using-custom-http-controllers and add a index method to app/Http/Controllers/Voyager/VoyagerController with the route to your custom blade file.

2) If you want to change the general look of every page, copy the content from the file vendor/tcg/voyager/resources/master.blade.php into a new file resources/views/vendor/voyager/master.blade.php and do necessary changes in the latter file.

All 8 comments

We already have the documentation for this https://voyager.readme.io/docs/overriding-views

but it doesn't include the master layout
how to override it, or if i create one how can i display the menu and stuff in it

I really want to remove that page from the documentation since it only seems to cause confusion....

The view override functionality is a laravel feature, not a Voyager one. We include it because of the dynamic nature of our BREAD functionality.

So Yes, you can override the master layout in the same way. Just be careful doing so since it affects nearly every Voyager page.

by creating a folder named master or just under the voyager directory ??

It needs to match the view structure. I'm mobile at the moment so I cant easily look it up for you, but I believe it should be at the root of the voyager view folder

I wanted to do the same, so here is what you can do:

1) If you want to completely change the dashboard page, you probably want to change the controller as well. Take a look at https://voyager.readme.io/docs/using-custom-http-controllers and add a index method to app/Http/Controllers/Voyager/VoyagerController with the route to your custom blade file.

2) If you want to change the general look of every page, copy the content from the file vendor/tcg/voyager/resources/master.blade.php into a new file resources/views/vendor/voyager/master.blade.php and do necessary changes in the latter file.

Thanks iwasherefirst2 Your reply has helped me

@almohajire and me too. Thank you iwasherefirst2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MikadoInfo picture MikadoInfo  路  3Comments

TPRAsh picture TPRAsh  路  3Comments

abacram picture abacram  路  3Comments

vaggelis2018 picture vaggelis2018  路  3Comments

wp-src picture wp-src  路  3Comments