Reputation: 13
hello i am new on laravel and i am trying to put some css localy but not work, i try every think to i find here but nothing work
{{--<link href="{{ asset('css/style.css') }}" rel="stylesheet">--}}
<link href="css/app.css" rel="stylesheet">
i try with these code and not work. still try go to http://localhost:8000/js/app.js but still saying error 404, i don't understand what happend.
i changed the permission for all files and not work too, this is my public/.htacces
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
i hope to someone help me, thanks
Upvotes: 0
Views: 834
Reputation: 1624
In your blade file where you are declaring the assets try:
<link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}">
You can know more: https://laravel.com/docs/5.4/helpers#method-asset
Laravel masks the /public route, That's why your home directory is "/" instead of "/public/index.php"
Upvotes: 1