mercredi 8 février 2017

Include the laravel functions in another internal PHP application file

I am working on a project in laravel and to finish the project faster I bought a template in themeforest.net. The problem is that the css and js files included in the theme have relative links to other files. To solve this problem I happened to convert the files css and js to php and put them a header ('Content-Type: application / javascript; charset = utf-8'); before the code and use the asset () function included in the laravel helpers to assign routes relative to absolute. The question is How can I include the asset() function of the laravel helpers file in public/example.js.php file?

http://ift.tt/2kUAkqE

I thought of using Use Illuminate \ Support \ helpers; And Require 'vendor / illuminate / support / Illuminate / Support / helpers.php';

And did not work, i get

<b>Fatal error</b>:  Call to undefined function asset()



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2lpLbGc
via IFTTT

Aucun commentaire:

Enregistrer un commentaire