src/Http/Controllers/PageAPIController.php
public function destroy(PageRequest $request, Page $page)
    {
        try {
            $page->delete();
            $message = trans('messages.success.deleted', ['Module' => trans('page::page.name')]);
            $code    = 202;
            $status  = 'success';
            $url     = guard_url('page/page/0');
        } catch (Exception $e) {
            $message = $e->getMessage();
            $code    = 400;
            $status  = 'error';
            $url     = guard_url('page/page/' . $page->getRouteKey());
        }
        return compact('message', 'code', 'status', 'url');
    }
public function destroy(PageRequest $request, Page $page)
    {
        try {
            $page->delete();
            $message = trans('messages.success.deleted', ['Module' => trans('page::page.name')]);
            $code    = 202;
            $status  = 'success';
            $url     = guard_url('page/page/0');
        } catch (Exception $e) {
            $message = $e->getMessage();
            $code    = 400;
            $status  = 'error';
            $url     = guard_url('page/page/' . $page->getRouteKey());
        }
        return compact('message', 'code', 'status', 'url');
    }
public function destroy ( PageRequest $ request , Page $ page ) { try { $ page -> delete ( ) ; $ message = trans ( 'messages.success.deleted' , [ 'Module' => trans ( 'page::page.name' ) ] ) ; $ code = 202 ; $ status = 'success' ; $ url = guard_url ( 'page/page/0' ) ; } catch ( Exception $ e ) { $ message = $ e -> getMessage ( ) ; $ code = 400 ; $ status = 'error' ; $ url = guard_url ( 'page/page/' . $ page -> getRouteKey ( ) ) ; } return compact ( 'message' , 'code' , 'status' , 'url' ) ; }
Remove the page.

@param Model   $page

@return Response
Remove the page .