Closed xnhinzkyx closed 9 years ago
Hi,
you have to options to overwrite the existing admin template.
I currently use adminLTE but I don't want to modify the files right in the vendor folder, how do I do that?
Do you have any idea? or suggestions?
Thanks...
Adminlte package is a Laravel package. Read official docs about Laravel packages:http://laravel.com/docs/5.1/packages and how to override view files as noxigy suggest you at option 1. In this way you can override vuew files without touching anything at vendor folder
Thanks to both of you noxify and acacha. I tried what is said in the official docs but still don't work. I copy the files from the packages and modify it but nothings changed.
No idea then without more info sorry... If you can you will publish you code on github and then e can check you code to try to find the problem.
I am using this V3 of admin package which I install in a fresh installation of Laravel 5.1 here https://github.com/sleeping-owl/admin/tree/development
And I use the template https://github.com/sleeping-owl/admin-lte-template and I want to override the view files of this template but I don't want to modify it directly which is inside the vendor/sleeping-owl/admin-lte-template
I would like to use the approach specified by noxify to add it in "resources/views/" and so on. Can you give me some example?
Hi,
I'm using https://github.com/barryvdh/laravel-debugbar to identify in which namespace the view to overwrite is
This example shows the admin login page. As you can see, there are two views:
Both views are currently package views.
Example: To overwrite the layout view with your own, you have to do the following:
/resources/views/vendor/admin-lte/default/
(admin-lte is the namespace --> see screenshot above)_layout
and inside this folder you have to create a file named base.blade.php
With this way, you have to add each file manually - this is okay if you want to change only one or two files. But if you want to change many things in the admin-lte theme you can do the following:
/vendor/sleeping-owl/admin-lte-template/src/views/default/*
to /resources/views/vendor/admin-lte/default/
or
Hope this helps :)
Great! now it works. Thanks @noxify for your great explanation and examples. Thank you guys.
you're welcome @xnhinzkyx - please don't forgot to close the issue ;)
Ah yeah thanks :+1:
Hello,
I been starting to use this package and can you help me how to override admin template? So that i have to add files in "resources/views/admin" folder instead of modifying files inside the vendor folder in SleepingOwl folder to be specific?
Thanks.