Skip to content

Instantly share code, notes, and snippets.

@gelinger777
Created July 1, 2019 02:21
Show Gist options
  • Save gelinger777/a6ccfa3cfe30be4c00a2704960c63cd8 to your computer and use it in GitHub Desktop.
Save gelinger777/a6ccfa3cfe30be4c00a2704960c63cd8 to your computer and use it in GitHub Desktop.
Voyager + Spark updated User.php model
namespace App;
use Laravel\Spark\User as SparkUser;
use Carbon\Carbon;
use Illuminate\Foundation\Auth\User as Authenticatable;
use TCG\Voyager\Contracts\User as UserContract;
use TCG\Voyager\Traits\VoyagerUser;
class User extends SparkUser implements UserContract
{
use VoyagerUser;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'email',
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = [
'password',
'remember_token',
'authy_id',
'country_code',
'phone',
'two_factor_reset_code',
'card_brand',
'card_last_four',
'card_country',
'billing_address',
'billing_address_line_2',
'billing_city',
'billing_zip',
'billing_country',
'extra_billing_information',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'trial_ends_at' => 'datetime',
'uses_two_factor_auth' => 'boolean',
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment