DarkGhostHunter / Laraconfig

Per-user settings repository system for Laravel
MIT License
173 stars 49 forks source link

Unable to locate publishable resources. #8

Closed modrictin closed 3 years ago

modrictin commented 3 years ago

Hi,

when I run command - php artisan vendor:publish --provider="DarkGhostHunter\Laraconfig\LaraconfigServiceProvider" --tag="migrations"

I get the error: Unable to locate publishable resources. Publishing complete.

Before the command above i have entered: composer require darkghosthunter/laraconfig

Am i doing something wrong?

DarkGhostHunter commented 3 years ago

Totally forgot to remove the !class_exists($class) bit.

I added that to not register migrations if the class was already loaded to avoid this error when loading the migrations, when using loadMigrationsFrom():

PHP Fatal error:  Cannot declare class [your-package-table], because the name is already in use

It's common nowadays to publish the migrations instead of loading them, because you may hit this error. I just forgot to remove the if from the old code which doesn't load the migration to PHP memory if was already loaded, but in this case, does not registers it as a publishable asset.

It's fixed on v1.3.1

modrictin commented 3 years ago

Thank you very much for a quick fix. I was going to implement user settings for my Vue app when I saw this awesome library on Reddit! Keep up the good work!

modrictin commented 3 years ago

I tried to update to v1.3.1 and I still get the error: Command: php artisan vendor:publish --provider="DarkGhostHunter\Laraconfig\LaraconfigServiceProvider" --tag="migrations"

Error: Unable to locate publishable resources. Publishing complete.

Maybe I'm doing something wrong?

DarkGhostHunter commented 3 years ago

No, you did nothing wrong. It was this line.

Should be fixed now in 1.3.2.