Hi there,
I'm currently developing a package in L4.2 but I'm not using the workbench I have a complete custom structure. But now I'm facing the problem that when I execute the artisan command view:publish I get the following error:
[InvalidArgumentException]
Views not found.
It seems like I have to give Laravel the location of my views but I can't find how to do this, so I hope anybody could help me.
My views are located at: vendor/package/src/views My service provider at: vendor/package/src/serviceprovider.php
I also tried to use php artisan view:publish vendor/package --path="src/views" but no luck so far.
True, but just like your config files in your package there has to be a way to say in my service provider where my package views are located beceause I'm not using the workbench command I have a custom directory structure.
I've never tried views and custom packages together. You might wanna checkout the http://laravel.com/docs/5.0/packages page. I think that's what you're looking for.
public function boot()
{
$this->loadViewsFrom(__DIR__.'/path/to/views', 'courier');
}
True and that works fine I have used it myself but that peace of code only works in a Laravel 5 package. And the package I'am currently developing is for laravel 4.2 so that code is not going to work.
Thanks for your input and help.
php artisan view:publish td/longstack --path="packages/vendorname/pacakgename/src/views/"
Is the solution, i forgot to specify the folder where alle packages ('packages') are located. Now i publishes the views. Thanks for your help!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community