Looking to hire Laravel developers? Try LaraJobs

laravel-page-mix maintained by mscharl

Description
Parses mix-manifest.json to automatically implement the Javascript named after the current route.
Last update
2017/05/15 11:55 (dev-master)
License
Links
Downloads
1 147

Comments
comments powered by Disqus

laravel-page-mix

This package parses your mix-manifest.json to automatically implement the Javascript named after the current route.

Setup

Add the service provider to the config/app.php provider array

MScharl\LaravelPageMix\Provider\LaravelPageMixProvider::class,

Use pageMix() instead of mix('page.js')

<script src="{{ pageMix() }}"></script>

Config

Publish the config file by executing the following command:

php artisan vendor:publish --provider=MScharl\\LaravelPageMix\\Provider\\LaravelPageMixProvider

It allows to configure a default file path if the route does not match any file name