inertia/tonka-adapter

Inertia TONKA adapter
125 8
Install
composer require inertia/tonka-adapter
Latest Version:v1.2.2
PHP:>=8.0
License:MIT
Last Updated:Sep 17, 2026
Links: GitHub  ·  Packagist
Maintainer: honorable85

Tonka PHP Framework Inertia.js Adapter

Overview

The Tonka PHP Framework Inertia.js Adapter allows you to seamlessly integrate Inertia.js with the Tonka PHP Framework. This adapter enables you to build modern single-page applications (SPAs) while leveraging server-side rendering and routing.

Features

  • Easy Integration: Quickly set up Inertia.js with Tonka.
  • Automatic Responses: Handle Inertia responses directly from your controllers.
  • Supports Multiple Frameworks: Works with Vue.js, React, and Svelte.
  • Navigation Handling: Simplified link handling and navigation management.
  • Error Handling: Built-in support for error pages and validation messages.

Installation

You can install the Tonka Inertia.js Adapter via Composer:

composer require inertia/tonka-adapter

Client-Side Setup:

Make sure to install the Inertia.js client-side adapter for your chosen framework:

npm install @inertiajs/inertia @inertiajs/inertia-vue

Usage:

Create a Controller to handle Inertia responses:

use Inertia\Inertia;

Route::get('/dashboard', function () {
    return Inertia::render('Dashboard', [
        'user' => auth()->user(),
        'notifications' => Notification::recent(),
    ]);
});

Client-Side Example:

<template>
    <div>
        <h1>{{ message }}</h1>
    </div>
</template>

<script>
export default {
    props: {
        message: String
    }
}
</script>

Contributing:

Contributions are welcome! Please open an issue or submit a pull request.

  1. Fork the repository.
  2. Create your feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/my-new-feature
  5. Open a Pull Request.

License:

This project is licensed under the MIT License - see the LICENSE file for details.

Contact:

For any inquiries, please reach out to

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

631,580,251 9,707
laravel/framework

The Laravel Framework.

580,311,802 34,925
laravel/tinker

Powerful REPL for the Laravel framework.

489,754,436 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

404,034,618 608
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

387,976,821 4,658