app/Services/UserService.php
public function find($user_id): ?User
    {
        return app('cache.array')->rememberForever(__CLASS__ . $user_id, static function () use ($user_id): ?User {
            return DB::table('user')
                ->where('user_id', '=', $user_id)
                ->get()
                ->map(User::rowMapper())
                ->first();
        });
    }
public function find($user_id): ?User
    {
        return app('cache.array')->rememberForever(__CLASS__ . $user_id, static function () use ($user_id): ?User {
            return DB::table('user')
                ->where('user_id', '=', $user_id)
                ->get()
                ->map(User::rowMapper())
                ->first();
        });
    }
public function find ( $ user_id ) : ? User { return app ( 'cache.array' ) -> rememberForever ( __CLASS__ . $ user_id , static function ( ) use ( $ user_id ) : ? User { return DB :: table ( 'user' ) -> where ( 'user_id' , '=' , $ user_id ) -> get ( ) -> map ( User :: rowMapper ( ) ) -> first ( ) ; } ) ; }
Find the user with a specified user_id.

@param int|null $user_id

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