campaigningbureau/laravel-page-mix

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

Installs: 858

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

pkg:composer/campaigningbureau/laravel-page-mix

v1.0 2018-09-17 12:11 UTC

This package is auto-updated.

Last update: 2025-09-18 05:05:50 UTC


README

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