You've already forked Atomcms-edit
feat: install and configure Inertia.js with React
- Install inertia-laravel, @inertiajs/react, react, @vitejs/plugin-react - Add HandleInertiaRequests middleware registered in web group - Create Inertia root template (resources/views/app.blade.php) - Add React entry point and page components (resources/js/) - Add Inertia demo route (/inertia-test) - HomeController reverted to Blade (index page stays original) - Remove inertia-test2 test route
This commit is contained in:
@@ -9,6 +9,13 @@ use App\Http\Controllers\Miscellaneous\MaintenanceController;
|
||||
use App\Http\Controllers\User\BannedController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
// Inertia demo route
|
||||
Route::get('/inertia-test', function () {
|
||||
return inertia('Home', [
|
||||
'hotelName' => setting('hotel_name', 'Epicnabbo'),
|
||||
]);
|
||||
})->name('inertia.test');
|
||||
|
||||
// Radio embed (public, no auth required)
|
||||
Route::get('/radio/embed', [\App\Http\Controllers\Radio\EmbedController::class, 'show'])->name('radio.embed');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user