ycs77 / inertia-engage
Opinionated Inertia.js Laravel & Vue helper library, to scaffolding and extended your Inertia.js application.
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
pkg:composer/ycs77/inertia-engage
Requires
- php: >=8.2
- ergebnis/json-printer: ^3.5
- inertiajs/inertia-laravel: ^2.0
- laravel/framework: >=12.0
- laravel/prompts: >=0.3
- symfony/console: >=7.0
Requires (Dev)
- orchestra/testbench: >=10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
README
Opinionated Inertia.js Laravel & Vue helper library, to scaffolding and extended your Inertia.js application.
Features:
Supported Versions
Version | Laravel Version |
---|---|
1.x | 11.x |
2.x | 12.x |
Installation
Install the package via composer:
composer require ycs77/inertia-engage
Publish the config file is optional:
php artisan vendor:publish --tag=inertia-engage-config
Then install the Inertia.js scaffold into this application:
php artisan inertia:install
# or export with TypeScript
php artisan inertia:install --ts
Or just initialize the Laravel application:
php artisan laravel:initial
Error Handler
If you running the
inertia:install
command, below will automatically added.
Publish the error page:
php artisan inertia:ui error
# export with TypeScript
php artisan inertia:ui error --ts
Then extends the exception handler for Inertia application:
bootstrap/providers.php.php
<?php use Illuminate\Foundation\Configuration\Exceptions; use Illuminate\Http\Request; use Inertia\Inertia; use Symfony\Component\HttpFoundation\Response; ->withExceptions(function (Exceptions $exceptions) { $exceptions->respond(function (Response $response, Throwable $e, Request $request) { return Inertia::exception()->handle($request, $response, $e); }); })
Pagination
Publish pagination component and css file:
php artisan inertia:ui pagination
# or export with TypeScript
php artisan inertia:ui pagination --ts
IDE Helper
If missing the IDE helper file in the Inertia Laravel package, you can publish the IDE helper file:
php artisan inertia:ide-helper
License
The MIT License (MIT). Please see License File for more information.