Although I'm not very experienced in laravel, i know what's probably happening.
When visiting /articles, the css and js files are being served from root "/" directory still, in a relative manner (files are in their correct spot. /css/styles.css, for example).
However, when you go two directories deep in the url structure, the css and js files are being served relative to the current directory, which is now /articles/. Now the Web server is looking for these files in locations such as /articles/css/style.css, which obviously does not exist.
Possible fixes:
Example:
......
<title>app name</title>
<base href="http://www.yourdomain.com">
.......
Example :
......
<title>app name</title>
<base href="{{ route('index.show') }}"
......
With example of named route of the following in app/Http/routes.php
Route::get('/', ['uses' => 'IndexController@showIndex', 'as' => 'index.show']);
By using the route helper method above you are affording yourself being untied to your current routes and url structure. You could change the / to /newindex in routes and the base href in this template would remain the same provided the route name stays the same too.
RewriteEngine On
RewriteBase /
<script src="http://fulldomain.com/scripts/name.js">
And, finally :
<script src="{{ URL::asset('css/styles.css") }}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community