for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MultiTenantLaravel\App\Models;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
abstract class BaseUser extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
* The attributes that should be hidden for arrays.
protected $hidden = [
'password', 'remember_token',
* Return all of the tenants this user is the owner of
public function owns()
return $this->hasMany(config('multi-tenant.tenant_class'), 'owner_id');
}