问题
i am beginner in laravel , im doing my project. but admin lte css path not working.. i had tried many time. but no lock.. enter image description here
i create a folder css on project root folder. i put all css and js file in it. enter image description here
<link rel="stylesheet" href="{{ URL::asset('/css/dist/AdminLTE.min.css') }}">
<!-- iCheck -->
<link rel="stylesheet" href="plugins/iCheck/square/blue.css">
<link rel="stylesheet" href="{{ URL::asset('css/plugins/iCheck/square/blue.css') }}">
but nothing show...
but whenever i try delete all folder like bootstrap and dist.
<link href="{{ URL::asset('css/bootstrap.css') }}" rel="stylesheet">
<link href="{{ URL::asset('css/bootstrap.min.css') }}" rel="stylesheet">
<link rel="stylesheet" href="{{ URL::asset('css/AdminLTE.min.css') }}">
<link rel="stylesheet" href="{{ URL::asset('css/AdminLTE.css') }}">
is work how to implements css and js file with folder name.
回答1:
Hey this is easy way to implement AdminLTE for Laravel 5
https://almsaeedstudio.com/blog/integrate-adminlte-with-laravel
and don't forget to Change it to <script src="{{ asset (" bower_components="" adminlte="" plugins="" jquery="" jquery-2.1.4.min.js")="" }}"=""></script>
there's no 2.1.3 in directory. the file is 2.1.4 or check the directory. if you not intrest then wright click the view inspect you will get path then correct the way you want :)
回答2:
Your assets should be in the public
folder, so move css
folder with all the contents into public
回答3:
Make a css folder inside the public folder Make a js Foler inside the public folder
change those links to
css files goes like this
<link rel='stylesheet' id='theme-style-css' href='{{ url("css/nameofthefiler.css") }}' type='text/css' media='all' />
js files goes like this
<script type='text/javascript' src='{{ url("js/jsfilename.js") }}'></script>
This works for me
btw i guess what you are doing is accessing files in the resources/assets
(not sure tho) but whats son the aboves works 100%
来源:https://stackoverflow.com/questions/36993095/laravel-adminlte-css-path-not-working