You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewException('Unable to load the "app" configuration file.');
}
foreach ($filesas$key => $path) {
$repository->set($key, require$path);
}
In 10.x the $app was available in all of the config files because it's passed as a parameter to the method that calls require FILE. In 11.x that's no longer the case.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
Lines 63 to 71 in cfedb23
In 10.x the
$app
was available in all of the config files because it's passed as a parameter to the method that callsrequire FILE
. In 11.x that's no longer the case.framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
Lines 63 to 77 in eb6fc3c
Of course, it's possible to call the
\app()
inside the files that needs the app's instance however this adds the overhead of calling a function.So here is the question - is it by design?
Beta Was this translation helpful? Give feedback.
All reactions