titasgailius / laravel-moonlight
为您的下一个单页应用精心设计的优雅Laravel脚手架。
1.0.4
2022-09-09 10:13 UTC
Requires
- inertiajs/inertia-laravel: ^0.2.5|^0.3|^0.4|^0.5|^0.6
- laravel/ui: ^1.0|^2.0|^3.0
- tightenco/ziggy: ^0.9.0|^1.4
README
Laravel Moonlight
Laravel Moonlight 是为您的下一个 SPA 应用程序精心设计的 Laravel 预设。
利用现有的服务器端框架,创建一个全客户端渲染的单页应用,而无需现代 SPA 所带来的复杂性。
技术栈
- TailwindCSS
- InertiaJS
- VueJS
- Ziggy (在您的 JS 中使用命名路由)
安装
使用 composer 安装
composer require titasgailius/laravel-moonlight
使用方法
安装包之后,您可以使用 ui Artisan 命令安装脚手架
// Generate basic scaffolding php artisan ui moonlight // Include authentication scaffolding php artisan ui moonlight --auth
截图
项目结构
project
│ - webpack.mix.js
│
└───resources
│ |
│ └───js
│ | │ - app.js
│ | │ - bootstrap.js
│ | │
│ | └───components // Global components that are auto-registered.
| | | | - form-input.vue
| | |
│ | └───layouts
| | | | - app.vue
| | |
│ | └───pages // This is where you put your application pages.
│ | │ - home.vue
│ | │ - welcome.vue
│ | │
│ | └───auth
│ | │ - login.vue
│ | │ - register.vue
│ | │ - verify.vue
│ | │
│ | └───passwords
│ | │ - confirm.vue
│ | │ - email.vue
│ | │ - reset.vue
│ |
│ └───sass
│ | | - app.scss
│ │
│ └───views
│ │ - app.blade.php
|
└───app/Providers
| // Here you may register any variables that are shared between pages.
│ - InertiaServiceProvider.php