itstudioat/spa is a Laravel package for initial laraval spa installation.
It currently has 0 GitHub stars and 74 downloads on Packagist (latest version v0.3.3).
Install it with composer require itstudioat/spa.
Discover more Laravel packages by itstudioat
or browse all Laravel packages to compare alternatives.
Last updated
Laravel-Spa installs all necessary items for a fresh Laravel Single Page Application.
The installation uses next to laravel:
It provides:
For the authenticated admins it supports
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.
laravel new new-laravel-app
.env
config/app.php
composer require itstudioat/spa
php artisan spa:install
php artisan spa:complete
Here you can enter your super_admin User.
Change the config/cors.php file
'supports_credentials' => true,
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>
If you use Postmark for mailing (i use it):
composer require symfony/postmark-mailer
composer require symfony/http-client
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 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 () {
...
php artisan serve
npm run dev
php artisan queue:work
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.
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.