Package Data | |
---|---|
Maintainer Username: | juanem1 |
Maintainer Contact: | juanemilioturk@gmail.com (Juan Emilio Turk) |
Package Create Date: | 2017-02-08 |
Package Last Update: | 2017-02-08 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-06 15:00:16 |
Package Statistics | |
---|---|
Total Downloads: | 6,546 |
Monthly Downloads: | 14 |
Daily Downloads: | 0 |
Total Stars: | 13 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Mix function to render versioned assetes outside Laravel project
First install Laravel Mix https://github.com/JeffreyWay/laravel-mix
Then add this this line in your require section
"require": {
"ibox/mix-function": "~1.0"
}
Then run:
composer install
Optionally you can run
composer dump-autoload
If you you have a public directory, you can configure laravel mix as follow
mix.setPublicPath('public');
mix.sass('resources/assets/sass/app.sass', 'public/css').version();
Require composer autoload
require '../vendor/autoload.php';
Then in your HTML you can use mix function like this:
<link href="<?= mix('/css/app.css', __DIR__) ?>" rel="stylesheet">