fix: add exception handling to ViewServiceProvider boot method to prevent application crashes on database errors
This commit is contained in:
parent
09d70d052b
commit
3f8ca0c6d9
@ -25,6 +25,7 @@ public function register(): void
|
|||||||
*/
|
*/
|
||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
if (Schema::hasTable('settings')) {
|
if (Schema::hasTable('settings')) {
|
||||||
view()->share('general', app(GeneralSettings::class));
|
view()->share('general', app(GeneralSettings::class));
|
||||||
view()->share('social', app(SocialMediaSettings::class));
|
view()->share('social', app(SocialMediaSettings::class));
|
||||||
@ -48,5 +49,7 @@ public function boot(): void
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user