Support functionality for assetic to integrate into Laravel 4 and handle configuration.
Add to your composer.json "require": { "dustingraham/asset-manager": "dev-master" },
Run composer update
Once installed, add the service provider and alias to app/config/app.php
.
'providers' => array (
...
'Aja\AssetManager\ServiceProvider',
...
),
'aliases' => array (
...
'Asset' => 'Aja\AssetManager\Facades\Asset',
...
),
Publish the config file.
> php artisan config:publish dustingraham/asset-manager
Compile production assets using
> php artisan aja:asset
Include the tags to output CSS and JS respectively.
<html>
<head>
...
<?php echo Asset::Stylesheets(); ?>
...
</head>
<body>
...
<?php echo Asset::Javascripts(); ?>
...
</body>
<html>