LaravelPackages.net
Acme Inc.
Toggle sidebar
campaigningbureau/laravel-page-mix

Parses mix-manifest.json to automatically implement the Javascript named after the current route.

858
0
v1.0
About campaigningbureau/laravel-page-mix

campaigningbureau/laravel-page-mix is a Laravel package for parses mix-manifest.json to automatically implement the javascript named after the current route.. It currently has 0 GitHub stars and 858 downloads on Packagist (latest version v1.0). Install it with composer require campaigningbureau/laravel-page-mix. Discover more Laravel packages by campaigningbureau or browse all Laravel packages to compare alternatives.

Last updated

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

CampaigningBureau\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=CampaigningBureau\\LaravelPageMix\\Provider\\LaravelPageMixProvider

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

Comments