Problems with Vendor:Publish in laravel 5

3k views Asked by At

I downloaded a package with composer. In this case the package is Riari Forum-Laravel. When I run php artisan vendor:publish, it says there is nothing to publish and I don't know why.

4

There are 4 answers

0
Sh1d0w On

To make Laravel aware that you have installed a package you need to tell the framework that. So open your config/app.php and add the forum package to your packages array:

'Riari\Forum\ForumServiceProvider',

After that you can do the publish command.

0
Frederiek On

are you using cashed config files ?

try using php artisan config:clear and retry php artisan vendor:publish

when your config files are cached any change to it will not be applied until you clear the config cache.

1
Deepak Thomas On

This always happens because Laravel cannot find the required references from your optimized/cached loader files.

Once you add the vendor's class to config/app.php, I have a script that runs:

php artisan config:cache
php artisan cache:clear
php artisan optimize (optional)

Post this, running php artisan vendor:publish --provider="xyz" will definitely work.

0
Anthony Piñero On

I do:

php artisan config:clear

then:

php artisan vendor:publish

next in my case:

php artisan my_migration_name:migration