Documentation

Service Provider Boot Order

Provider registration sequence in bootstrap/providers.php and why order matters

Last updated: Feb 09, 2026

Service Provider Boot Order

Providers are registered in bootstrap/providers.php in a deliberate sequence:

#ProviderPurpose
1App\Providers\AppServiceProviderLaravel defaults
2App\Providers\FortifyServiceProviderFortify auth (2FA, registration, password reset)
3App\Providers\ThemeServiceProviderTheme view paths + Inertia share
4Cartxis\Core\CoreServiceProviderCore singletons (hook, menu, setting, extension, theme, payment gateway)
5Cartxis\Core\MailConfigServiceProviderDynamic mail config from DB
6Cartxis\Admin\AdminServiceProviderAdmin auth, middleware, routes
7Cartxis\Product\ProductServiceProviderProducts, categories, attributes, brands, reviews
8Cartxis\Cart\CartServiceProviderCart logic, tax/shipping calculators
9Cartxis\Shop\ShopServiceProviderStorefront — repositories, services, frontend middleware
10Cartxis\Settings\SettingsServiceProviderAdmin settings pages
11Cartxis\Stripe\StripeServiceProviderStripe payment gateway (extension)
12Cartxis\Razorpay\RazorpayServiceProviderRazorpay gateway (extension)
13Cartxis\PhonePe\PhonePeServiceProviderPhonePe gateway (extension)
14Cartxis\Sales\SalesServiceProviderOrders, invoices, shipments, credit memos, transactions
15Cartxis\Customer\CustomerServiceProviderCustomer management, groups, addresses, wishlists
16Cartxis\Setup\SetupServiceProviderMust be before CMS — prevents catch-all route conflict
17Cartxis\CMS\CMSServiceProviderPages, blocks, media library, storefront menus
18Cartxis\System\SystemServiceProviderCache, extensions UI, permissions, maintenance, backups
19Cartxis\Reports\ReportsServiceProviderSales/product/customer reports
20Cartxis\Marketing\MarketingServiceProviderCoupons, promotions
21Cartxis\API\APIServiceProviderREST API v1
Important: Setup must load before CMS. CMS registers a catch-all /{slug} route for dynamic pages — if loaded first, it would intercept the setup wizard routes.