1. Go to this page and download the library: Download jengo/inertia library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jengo / inertia example snippets
namespace App\Controllers;
use Jengo\Inertia\Inertia;
class DashboardController extends BaseController
{
public function index()
{
return Inertia::render('Dashboard', [
'totalUsers' => 150,
'recentActivity' => [...],
]);
}
}
use CodeIgniter\Debug\ExceptionHandlerInterface;
use Jengo\Inertia\Debug\InertiaExceptionHandler;
use Throwable;
public function handler(int $statusCode, Throwable $exception): ExceptionHandlerInterface
{
return new InertiaExceptionHandler($this);
}
bash
composer ngo:install vite
php spark jengo:install inertia
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.