itstudioat/spa
Composer 安装命令:
composer require itstudioat/spa
包简介
Initial Laraval Spa Installation
关键字:
README 文档
README
What is Laravel-Spa
Laravel-Spa installs all necessary items for a fresh Laravel Single Page Application.
The installation uses next to laravel:
- Vue with Vue-Router as Javascript-Framework and routing
- Pinia as state store
- Vuetify as css-framework
- Sanctum as authentication-system for single-page-applications
- Vite for asset bundling
It provides:
- Login page together with a 'Unkown password' page and a Register page
- The login use a 2-factor-authentification (password an email), if the user has set 2-fa option
For the authenticated admins it supports
- Dashboard
- Users page, where all users are listed, may be added, changed or deleted
- Profile update with password change
- Logout
It integrates the Spatie roles and you can manage the role-based access to all web- and api-routes.
After installing this package, you can easily start to develop your own single page application with all necessary requirements.
Installation
Install a new laravel project
laravel new new-laravel-app
Make all necessary configurations
-
.env
- APP_URL
- DB-configuration
- MAIL-configuration
- SESSION_DOMAIN='.localhost'
- LOCALE-configuration
-
config/app.php
- timezone
Create an empty database correspondig to the .env configuration
Install this package and run the install-commands
composer require itstudioat/spa
php artisan spa:install php artisan spa:complete
Here you can enter your super_admin User.
Make important entries in some files
Change the config/cors.php file
'supports_credentials' => true,
You may inividualize your logo for mails
php artisan vendor:publish --tag=laravel-mail
Change the file resources/views/mail/html/header.blade.php to:
@props(['url']) <tr> <td class="header"> <a href="{{ $url }}" style="display: inline-block;"> <img src="{{ asset('storage/images/logo.png') }}" class="logo" alt="Your Logo"> </a> </td> </tr>
Install your mailing system
If you use Postmark for mailing (i use it):
composer require symfony/postmark-mailer composer require symfony/http-client
Permissions for routes
Web-Routes
Under routes/meta/web there is for each route.js-file a php-file. Here you may define, which route needs which (spatie-)roles. if the array is empty, no permission is needed.
With a simple command you can synchronize these files. The php-file is made actual with the route-js-file as basis:
php artisan routes:sync
Api-Routes
Api-Routes may secured with the 'api-allowed'-Middleware followed from the allowed roles. In this example all users with the role admin may pass the apis
Route::middleware(['auth:sanctum', 'api-allowed:admin'])->group(function () { ...
Usage
php artisan serve npm run dev php artisan queue:work
Sending E-Mails
That everything works fine, sending E-Mails must be configured. I use Postmark for Mailing and everything is fine. You can find more infos under Laravel/Notifications.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
itstudioat/spa 适用场景与选型建议
itstudioat/spa 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 74 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 04 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「SPA」 「itstudioat」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 itstudioat/spa 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 itstudioat/spa 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 itstudioat/spa 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel-Nuxt starter project template.
Appui DOM Interface
A Laravel-Vue SPA starter project template with Tailwind CSS integration.
Alfabank REST API integration
A simple lightweight admin template based on laravel and vuetifyjs. Simple and clean
This is my package vuedata
统计信息
- 总下载量: 74
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-17