mirror of
https://github.com/koel/koel
synced 2024-12-19 17:13:09 +00:00
18 lines
375 B
PHP
18 lines
375 B
PHP
<?php
|
|
|
|
namespace App\Repositories;
|
|
|
|
use App\Models\User;
|
|
|
|
class UserRepository extends Repository
|
|
{
|
|
public function getDefaultAdminUser(): User
|
|
{
|
|
return User::query()->where('is_admin', true)->oldest()->firstOrFail();
|
|
}
|
|
|
|
public function findOneByEmail(string $email): ?User
|
|
{
|
|
return User::query()->where('email', $email)->first();
|
|
}
|
|
}
|