database/factories/UserFactory.php
/**
     * Indicate that the user should have a personal team.
     *
     * @return $this
     */
Indicate that the user should have a personal team.
@return $this
Indicate that the user should have a personal team . @return $this
public function withPersonalTeam()
    {
        if (! Features::hasTeamFeatures()) {
            return $this->state([]);
        }
        return $this->has(
            Team::factory()
                ->state(function (array $attributes, User $user) {
                    return ['firstname' => $user->firstname.'\'s Team', 'user_id' => $user->id, 'personal_team' => true];
                }),
            'ownedTeams'
        );
    }
public function withPersonalTeam ( ) { if ( ! Features :: hasTeamFeatures ( ) ) { return $ this -> state ( [ ] ) ; } return $ this -> has ( Team :: factory ( ) -> state ( function ( array $ attributes , User $ user ) { return [ 'firstname' => $ user -> firstname . '\'s Team' , 'user_id' => $ user -> id , 'personal_team' => true ] ; } ) , 'ownedTeams' ) ; }
Indicate that the user should have a personal team.
Indicate that the user should have a personal team .