Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 4: Publishing a Package's Assets

Tags:

php

laravel-4

How to publish package assets? I've found a tutorial here: http://laravel-recipes.com/recipes/279

But when I tried to publish assets from my workbench, I get this error:

[RuntimeException]         
 Unable to publish assets.  

asset:publish [--bench[="..."]] [--path[="..."]] [package]

My command code is:

php artisan asset:publish --bench=Mypackage

How can I get my package assets to be published.

Thank you.

like image 941
user1995781 Avatar asked Dec 20 '22 18:12

user1995781


1 Answers

When you want to publish assets that are developed and stored in your workbench you should use the --bench flag. In your case you want to publish a package in the vendor folder then provide "myVendor/myPackage".

Publishing assets from a vendor package

php artisan asset:publish "vendor/package"

Publishing assets from a workbench package

php artisan asset:publish --bench="vendor/package"
like image 140
sidneydobber Avatar answered Dec 24 '22 02:12

sidneydobber