Laravel Code Reorder Hard +35 XP
Service Provider Boot
Arrange the service provider structure.
Click lines in the correct order
Available lines4 left
Your order
Click lines above to build your solution.
Show answer and explanation
Answer: class AppServiceProvider extends ServiceProvider {
public function register(): void {}
public function boot(): void { View::share('siteName', 'MyApp'); }
}
Class declaration first, register() binds services, boot() runs after all services are registered.
Hint: register() first, boot() after.
What this challenge tests
Code Reorder in Laravel: service-providers, boot.