Armitage2k Armitage2k - 2 months ago 54
PHP Question

XAMPP + Laravel + AdminLTE

Alright, so I got super excited when I found the Admin Dash Laravel template which ports the entire AdminLTE template over to Laravel 5.4, including sample pages, db tables, etc., just to hit a roadblock when trying to run this on my local XAMPP Server...

I followed the instructions and:

  • created a new Laravel project via
    laravel new test3

  • downloaded the Admin-Dash files and pasted them into the new project folder (test3)

  • ran
    php artisan migration

  • ran
    npm install

  • edited my
    file to point to the correct folder

which resulted in this:
enter image description here

None of the supposedly provided sites such as
nor the CSS / JS features seem to work, most likely due to the template looking for the
folder in
while they are actually located in

How can I change the folder destination in the template? Appreciate any help on that, thank you!


As pointed out earlier, there is a problem with the css/js folder location. I have since located the blades for Admin/Guest/Common in
and adjusted them as following:

eg. jQuery

<!-- jQuery 2.2.3 -->
<script src="/plugins/jQuery/jquery-2.2.3.min.js"></script>

<!-- jQuery 2.2.3 -->
<script src="/test3/public/plugins/jQuery/jquery-2.2.3.min.js"></script>

This seems to finally fix the layout issue, but when clicking on any link such as eg.
it points me to
instead of
. It shouldnt be necessary to mess around with the master blade configuration which makes me wonder if there is a master setting for the Admin-Dash path that I am missing?


Since the CSS/JS issue was fixed by utilizing
{{ asset }}
, the only problem left are the routes. Right now, when navigating to eg
I receive a 404 error, suggesting problems with either the APP URL or routes. Both below:


// Registration routes
Route::get('register', 'Auth\AuthController@showRegistrationForm')->name('register');
Route::post('register', 'Auth\AuthController@register');


'url' => env('APP_URL', 'http://localhost/test4'),

Latest screenshot of the console:
enter image description here

Answer Source

First, remove the /test3 from your src="/test3/public/plugins/jQuery/jquery-2.2.3.min.js". Then, define css/js path like: {{ asset('plugins/jQuery/jquery-2.2.3.min.js') }}.

Be sure that you have jquery-2.2.3.min.js in plugins/jQuery/ directory!

Make changes in config/app.php like url' => env('APP_URL', 'http://localhost/test4'),

Use project by creating virtualhost easily and also for implementing and redirection!

Hope this steps may fixed you problem! :)