database/seeds/TeamSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $user = User::first();
        $team = Team::create([
            'user_id' => $user->id,
            'name'    => 'Personal',
        ]);
        $team->addMember($user, 'owner');
        $user->update(['current_team_id' => $team->id]);
        $team->createAsStripeCustomer();
        $this->seedActivity($team);
    }
public function run ( ) { $ user = User :: first ( ) ; $ team = Team :: create ( [ 'user_id' => $ user -> id , 'name' => 'Personal' , ] ) ; $ team -> addMember ( $ user , 'owner' ) ; $ user -> update ( [ 'current_team_id' => $ team -> id ] ) ; $ team -> createAsStripeCustomer ( ) ; $ this -> seedActivity ( $ team ) ; }
Run the database seeds.
Run the database seeds .