* @param string $provider
* @return \Illuminate\Support\ServiceProvider
*/
public function resolveProvider($provider)
{
return new $provider($this);
}
/**
* Mark the given provider as registered.
*
// If the given "provider" is a string, we will resolve it, passing in the
// application instance automatically for the developer. This is simply
// a more convenient way of specifying your service provider classes.
if (is_string($provider)) {
$provider = $this->resolveProvider($provider);
}
$provider->register();
// If there are bindings / singletons set as properties on the provider we
* @return void
*/
public function register()
{
if ($this->app->environment('local')) {
$this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
// $this->app->register(TelescopeServiceProvider::class);
}
if ($this->app->environment('production')) {
\Illuminate\Support\Facades\DB::statement('SET SESSION sql_require_primary_key=0');
// a more convenient way of specifying your service provider classes.
if (is_string($provider)) {
$provider = $this->resolveProvider($provider);
}
$provider->register();
// If there are bindings / singletons set as properties on the provider we
// will spin through them and register them with the application, which
// serves as a convenience layer while registering a lot of bindings.
if (property_exists($provider, 'bindings')) {
// We will go ahead and register all of the eagerly loaded providers with the
// application so their services can be registered with the application as
// a provided service. Then we will set the deferred service list on it.
foreach ($manifest['eager'] as $provider) {
$this->app->register($provider);
}
$this->app->addDeferredServices($manifest['deferred']);
}
->partition(fn ($provider) => str_starts_with($provider, 'Illuminate\\'));
$providers->splice(1, 0, [$this->make(PackageManifest::class)->providers()]);
(new ProviderRepository($this, new Filesystem, $this->getCachedServicesPath()))
->load($providers->collapse()->toArray());
}
/**
* Register a service provider with the application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
$app->registerConfiguredProviders();
}
}
$this->hasBeenBootstrapped = true;
foreach ($bootstrappers as $bootstrapper) {
$this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
$this->make($bootstrapper)->bootstrap($this);
$this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
}
}
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
* Get the route dispatcher callback.
{
$this->app->instance('request', $request);
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
$this->requestStartedAt = Carbon::now();
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Kernel::class);
$response = tap($kernel->handle(
$request = Request::capture()
))->send();
$kernel->terminate($request, $response);
Error
|
---|
Error: Class "Laravel\Telescope\TelescopeServiceProvider" not found at /var/www/neo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:851 at Illuminate\Foundation\Application->resolveProvider() (/var/www/neo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:785) at Illuminate\Foundation\Application->register() (/var/www/neo/app/Providers/AppServiceProvider.php:33) at Neo\Providers\AppServiceProvider->register() (/var/www/neo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:788) at Illuminate\Foundation\Application->register() (/var/www/neo/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:75) at Illuminate\Foundation\ProviderRepository->load() (/var/www/neo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:765) at Illuminate\Foundation\Application->registerConfiguredProviders() (/var/www/neo/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:17) at Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() (/var/www/neo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:263) at Illuminate\Foundation\Application->bootstrapWith() (/var/www/neo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:186) at Illuminate\Foundation\Http\Kernel->bootstrap() (/var/www/neo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:170) at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() (/var/www/neo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:144) at Illuminate\Foundation\Http\Kernel->handle() (/var/www/neo/public/index.php:52) |