src/Http/Controllers/Admin/System/LogViewerController.php
public function delete(Log $log)
    {
        $this->authorize(LogViewerPolicy::PERMISSION_DELETE);

        $date = $log->date;

        if ($this->logViewer->delete($date)) {
            $this->notifySuccess(
                $message = trans('foundation::log-viewer.messages.deleted.message', compact('date')),
                trans('foundation::log-viewer.messages.deleted.title')
            );

            return $this->jsonResponseSuccess(compact('message'));
        }

        return $this->jsonResponseError([
            'message' => "An error occurred while deleting the log [$date]"
        ]);
    }
public function delete(Log $log)
    {
        $this->authorize(LogViewerPolicy::PERMISSION_DELETE);

        $date = $log->date;

        if ($this->logViewer->delete($date)) {
            $this->notifySuccess(
                $message = trans('foundation::log-viewer.messages.deleted.message', compact('date')),
                trans('foundation::log-viewer.messages.deleted.title')
            );

            return $this->jsonResponseSuccess(compact('message'));
        }

        return $this->jsonResponseError([
            'message' => "An error occurred while deleting the log [$date]"
        ]);
    }
public function delete ( Log $ log ) { $ this -> authorize ( LogViewerPolicy :: PERMISSION_DELETE ) ; $ date = $ log -> date ; if ( $ this -> logViewer -> delete ( $ date ) ) { $ this -> notifySuccess ( $ message = trans ( 'foundation::log-viewer.messages.deleted.message' , compact ( 'date' ) ) , trans ( 'foundation::log-viewer.messages.deleted.title' ) ) ; return $ this -> jsonResponseSuccess ( compact ( 'message' ) ) ; } return $ this -> jsonResponseError ( [ 'message' => "An error occurred while deleting the log [$date]" ] ) ; }
Delete a log.

@param  \Arcanedev\LogViewer\Entities\Log  $log

@return \Illuminate\Http\JsonResponse
Delete a log .