massive improvements to tests, streamlined and synced migrations, fixed a lot of wrong or old table field references. implemented a lot of pages in react for website frontend
This commit is contained in:
@@ -16,7 +16,7 @@ class TenantPackage extends Model
|
||||
protected $fillable = [
|
||||
'tenant_id',
|
||||
'package_id',
|
||||
'purchased_price',
|
||||
'price',
|
||||
'purchased_at',
|
||||
'expires_at',
|
||||
'used_events',
|
||||
@@ -24,7 +24,7 @@ class TenantPackage extends Model
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'purchased_price' => 'decimal:2',
|
||||
'price' => 'decimal:2',
|
||||
'purchased_at' => 'datetime',
|
||||
'expires_at' => 'datetime',
|
||||
'used_events' => 'integer',
|
||||
|
||||
@@ -56,6 +56,31 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the user by the given credentials.
|
||||
*/
|
||||
public function retrieveByCredentials(array $credentials)
|
||||
{
|
||||
if ($this->getProvider()->hasTable($this->getTable())) {
|
||||
return $this->newModelQuery()
|
||||
->where(function ($query) use ($credentials) {
|
||||
// Handle 'login' field for email or username
|
||||
if (isset($credentials['login'])) {
|
||||
$login = $credentials['login'];
|
||||
$query->where('email', $login)
|
||||
->orWhere('username', $login);
|
||||
} else {
|
||||
foreach ($this->getAuthIdentifiers() as $key => $value) {
|
||||
$query->where($key, $value);
|
||||
}
|
||||
}
|
||||
})
|
||||
->first();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function fullName(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
|
||||
Reference in New Issue
Block a user