定制 inertia/tonka-adapter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

inertia/tonka-adapter

最新稳定版本:v1.2.0

Composer 安装命令:

composer require inertia/tonka-adapter

包简介

Inertia TONKA adapter

README 文档

README

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 clicalmani

统计信息

  • 总下载量: 62
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-15