mercredi 24 octobre 2018

Handle own requests but when use function Search datetime in range, the exception dont return the message in Exception

When i handle the search function and if there is no match, they will return no result. But when i search in here, they return success with no events.

public function searchEvents(){
        try {
            $events = $this->repository->getByDate();
        } catch (EventException $e) {
            report($e);
            return back()->withError($e->getMessage())->withInput();
        }
        return $this->sendResponse($events->toArray(), 'Events found successfully.'); 
    }

This is in my EventException class

public function report(){
        \Log::debug('Event not found');
    }

I dont know why i cant return the log. Please help me ><



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire