teepluss / laravel-theme

Theme and asset managing for laravel
MIT License
546 stars 132 forks source link

Failed to call asset() when use container with queue #70

Closed Cengkaruk closed 10 years ago

Cengkaruk commented 10 years ago

Hi Teepluss,

I got this error when try to use queue group (also single queue).

$theme->asset()->queue('compress-footer', function($asset)
{
    $theme->asset()->container('footer')->usePath()->add('bootstrap', 'js/bootstrap.min.js', array('core-script'));
    $theme->asset()->container('footer')->usePath()->add('wow', 'js/wow.min.js', array('core-script'));
});
Call to a member function asset() on a non-object

Thanks

teepluss commented 10 years ago
$theme->asset()->queue('compress-footer', function($asset)
{
    $asset()->container('footer')->usePath()->add('bootstrap', 'js/bootstrap.min.js', array('core-script'));
    $asset()->container('footer')->usePath()->add('wow', 'js/wow.min.js', array('core-script'));
});