mardi 15 décembre 2020

Add a prefix to all style references across the Laravel/Blade app

I'm migrating a Laravel application from a subdomain to a URL subfolder. So it was at https://app.example.com and now are served at https://example.com/app.

All my blade reference to stylesheet are now broken. Since there are a lot of them, I rather like to change a environment or something than modify all Html::style one by one.

So, nowadays I have:


This code is parsed as:

<link media="all" type="text/css" rel="stylesheet" href="https://example.com/front/bower_components/Gridlock/fs.gridlock.min.css">

Is there a way to make Html::style automatically build the URL with app prefix, like https://example.com/app/front/bower_components/Gridlock/fs.gridlock.min.css



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/37mYS3r
via IFTTT

Aucun commentaire:

Enregistrer un commentaire