itstudioat/spa 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

itstudioat/spa

Composer 安装命令:

composer require itstudioat/spa

包简介

Initial Laraval Spa Installation

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 itstudioat/spa 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-17