File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 33namespace Pharaonic \Laravel \Modulator ;
44
55use Illuminate \Support \ServiceProvider ;
6+ use Laravel \Prompts \Output \ConsoleOutput ;
67use Pharaonic \Laravel \Modulator \Packages \{
78 Translatable \Commands \TranslatableMake ,
89};
@@ -158,10 +159,16 @@ protected function registerProviders()
158159 $ finder ->build ();
159160 }
160161
162+ $ output = new ConsoleOutput ();
163+
161164 // Register the exists providers
162165 foreach ($ finder ->list as $ provider ) {
163- if (class_exists ($ provider , false )) {
164- $ this ->app ->register ($ provider );
166+ try {
167+ if (class_exists ($ provider )) {
168+ $ this ->app ->register ($ provider );
169+ }
170+ } catch (\Exception $ e ) {
171+ $ output ->writeln ("<comment>Failed to register provider: {$ provider }, you need to run <info>module:discover</info> again. " );
165172 }
166173 }
167174 }
You can’t perform that action at this time.
0 commit comments