app/Services/UserService.php
public function findByEmail($email): ?User
    {
        return DB::table('user')
            ->where('email', '=', $email)
            ->get()
            ->map(User::rowMapper())
            ->first();
    }
public function findByEmail($email): ?User
    {
        return DB::table('user')
            ->where('email', '=', $email)
            ->get()
            ->map(User::rowMapper())
            ->first();
    }
public function findByEmail ( $ email ) : ? User { return DB :: table ( 'user' ) -> where ( 'email' , '=' , $ email ) -> get ( ) -> map ( User :: rowMapper ( ) ) -> first ( ) ; }
Find the user with a specified email address.

@param string $email

@return User|null
Find the user with a specified email address .