Support the ongoing development of Laravel.io →
posted 9 years ago
Views
Last updated 2 years ago.
0

Just an educated guess, but with your first route you are in the folder /dev/, whereas with the second route you are in the folder /dev/article_xy/. And because you are using the same relative path for your asset (css file), it will work with route 1, but not with route 2.

I suggest to use an asset loading helper from Laravel, which should be available in .php files as well as blade templates. For example http://laravel-recipes.com/recipes/184/generating-a-link-to-a-css-file

The advantage of that is that it will create an absolute path for your asset and thus, always load it properly.

Last updated 9 years ago.
0

That was my guess also, but it just seemed strange.

Thanks for the link.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

cclites cclites Joined 9 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.