定制 2wee/laravel 二次开发

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

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

2wee/laravel

Composer 安装命令:

composer require 2wee/laravel

包简介

Laravel SDK for the 2wee terminal UI protocol

README 文档

README

A Laravel plugin that exposes your application's data to 2Wee TUI clients. Define resources — each one maps an Eloquent model to a set of screens — and the plugin handles routing, authentication, and the protocol.

Installation

composer require 2wee/laravel
php artisan 2wee:install
php artisan migrate

Create a resource

php artisan 2wee:resource CustomerResource --model=Customer

Edit the generated file in app/TwoWee/Resources/CustomerResource.php to define your fields and columns, then connect any 2Wee client to:

https://your-app.example.com/terminal

Web terminal (optional)

Embed a browser-based terminal directly in your app — no client installation required:

php artisan 2wee:install-terminal
php artisan 2wee:start-terminal

Add to any Blade view:

<x-2wee::terminal />

Set TWOWEE_QUIT_URL in your .env to redirect users when they exit the terminal:

TWOWEE_QUIT_URL=https://your-app.example.com

Artisan commands

Command Description
2wee:install Publish config and scaffold resources directory
2wee:resource Generate a new resource class
2wee:lookup Generate a reusable lookup class
2wee:action Generate a screen action class
2wee:install-terminal Download web terminal binaries
2wee:start-terminal Start the web terminal service
2wee:stop-terminal Stop the web terminal service
2wee:check-terminal Show terminal service status

Documentation

Full documentation at 2wee.dev.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-22