New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ibox/mix-function

Laravel mix function to render versioned assetes
6,673 13
Install
composer require ibox/mix-function
Latest Version:v1.0.0
PHP:>=5.4.0
License:MIT
Last Updated:Feb 8, 2017
Links: GitHub  ·  Packagist
Maintainer: juanem1

mix-funciton

Mix function to render versioned assetes outside Laravel project

Instalation

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

Configuration

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();

Usage

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">

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

665,354,487 9,703
laravel/framework

The Laravel Framework.

633,434,998 35,124
laravel/tinker

Powerful REPL for the Laravel framework.

539,265,140 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

458,029,405 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP License
v1.0.0 >=5.4.0 MIT