ezitisitis/jetstream-no-personal-team

Remove personal team forcing from Laravel Jetstream

v1.3.0 2024-05-08 11:18 UTC

This package is auto-updated.

Last update: 2024-12-16 07:47:49 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()

Credits