Core Setup
Now that LaravelUi5 Core is installed, I’ll show you how to wire it into your Laravel project. We’ll register the Ui5CoreServiceProvider, adjust the middleware stack, publish the config file, and set up your .env for development. This gives you a fully UI5-ready Laravel app — explicit, modular, and under your control.
Quick Reference
These are the commands and snippets from this video. For the why and the bigger picture, be sure to follow along in the video above.
1. Service Provider
Add the service provider to bootstrap/providers.php.
LaravelUi5\Core\Ui5CoreServiceProvider::class2. Update Laravel Cached Package Manifest
In the terminal execute
php artisan package:discover3. Add to the middleware section
Open bootstrap/app.php and add in the middleware section
$middleware->web(replace: [
\Illuminate\Foundation\Http\Middleware\ValidateCsrfToken::class => \LaravelUi5\Core\Middleware\VerifyCsrfToken::class
]);
$middleware->appendToGroup('web', [
\LaravelUi5\Core\Middleware\FetchCsrfToken::class,
\LaravelUi5\Core\Middleware\ResolveUi5Context::class
]);4. Publish config file
In the terminal execute
php artisan vendor:publish --tag=ui5-config5. Add SYSTEM switch
Open your .env file and add the line
SYSTEM=DEVCode
To get the exact code with all edits in this video applied, run
git checkout episode-03