Problem in App Service Provider

Posted 8 months ago by herrygallery

Problem:

In Providers - App Service Provider, I wrote :

View::share('publicoption', DB::table('options')->first());

Then I manually drop all of my tables from XAMPP including Options table above to test my migration and seed. Then got error :

SQLSTATE[42S02]: Base table or view not found: 1146

If I delete the above code in the App Service Provider, everything works OK.

Is my code wrong? Do I have to adjust the code in App Service Provided to refresh my tables?

Thanks

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.