Skip to content

Commit

Permalink
Utilize static properties for team and membership like User. (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
mallardduck authored Sep 9, 2020
1 parent 872fc2c commit 16840d7
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/Jetstream.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ class Jetstream
*/
public static $userModel = 'App\\Models\\User';

/**
* The team model that should be used by Jetstream.
*
* @var string
*/
public static $teamModel = 'App\\Models\\Team';

/**
* The membership model that should be used by Jetstream.
*
* @var string
*/
public static $membershipModel = 'App\\Models\\Membership';

/**
* Determine if Jetstream has registered roles.
*
Expand Down Expand Up @@ -227,7 +241,7 @@ public static function useUserModel(string $model)
*/
public static function teamModel()
{
return 'App\\Models\\Team';
return static::$teamModel;
}

/**
Expand All @@ -249,7 +263,7 @@ public static function newTeamModel()
*/
public static function membershipModel()
{
return 'App\\Models\\Membership';
return static::$membershipModel;
}

/**
Expand Down

0 comments on commit 16840d7

Please sign in to comment.