mirror of
https://github.com/koel/koel
synced 2024-11-28 06:50:27 +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();
|
|
}
|
|
}
|