ezitisitis / jetstream-no-personal-team
Remove personal team forcing from Laravel Jetstream
v1.3.0
2024-05-08 11:18 UTC
Requires
- laravel/framework: ^9.19|^10.0|^11.0
- laravel/jetstream: ^2.13|^3.0|^4.0|^5.0
This package is auto-updated.
Last update: 2024-11-16 07:43:53 UTC
README
Install
Install using composer:
composer require ezitisitis/jetstream-no-personal-team
After that run install command:
php artisan jetstream-no-personal-team:install
Execute newly created migration:
php artisan migrate
Replace HasTeams
in User
Model with:
use HasNoPersonalTeam, HasTeams { HasNoPersonalTeam::ownsTeam insteadof HasTeams; HasNoPersonalTeam::isCurrentTeam insteadof HasTeams; }
Remove $this->createTeam($user);
from App\Actions\Fortify\CreateNewUser
In blades replace Laravel\Jetstream\Jetstream::hasTeamFeatures()
with
Laravel\Jetstream\Jetstream::hasTeamFeatures() && Auth::user()->isMemberOfATeam()