Create a module containing everything you want for a starter module.
- Installing Jetstream livewire https://jetstream.laravel.com/2.x/installation.html#livewire
You may use Composer to install Jetstream into your new Laravel project:
composer require laravel/jetstream
php artisan jetstream:install livewire --teams
After installing Jetstream, you should install and build your NPM dependencies and migrate your database:
npm install npm run dev php artisan migrate
php artisan vendor:publish --tag=jetstream-views
composer require akw82/laravel-livewire-module-generator
php artisan vendor:publish --provider="Akw82\LaravelLivewireModuleGenerator\GenerateModuleServiceProvider" --tag="config"
php artisan vendor:publish --provider="Akw82\LaravelLivewireModuleGenerator\GenerateModuleServiceProvider" --tag="components"
Consult the Prerequisites page for important considerations regarding your User models! This package publishes a config/permission.php file. If you already have a file by that name, you must rename or remove it. You can install the package via composer:
composer require spatie/laravel-permission
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
php artisan optimize:clear
php artisan migrate
use Illuminate\Foundation\Auth\User as Authenticatable; use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable { use HasRoles;
// ...
}