src/Http/Controllers/BlockResourceController.php
public function destroy(BlockRequest $request, Block $block)
    {
        try {

            $block->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('block::block.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('block/block'))
                ->redirect();

        } catch (Exception $e) {

            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('block/block/' . $block->getRouteKey()))
                ->redirect();
        }

    }
public function destroy(BlockRequest $request, Block $block)
    {
        try {

            $block->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('block::block.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('block/block'))
                ->redirect();

        } catch (Exception $e) {

            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('block/block/' . $block->getRouteKey()))
                ->redirect();
        }

    }
public function destroy ( BlockRequest $ request , Block $ block ) { try { $ block -> delete ( ) ; return $ this -> response -> message ( trans ( 'messages.success.deleted' , [ 'Module' => trans ( 'block::block.name' ) ] ) ) -> code ( 202 ) -> status ( 'success' ) -> url ( guard_url ( 'block/block' ) ) -> redirect ( ) ; } catch ( Exception $ e ) { return $ this -> response -> message ( $ e -> getMessage ( ) ) -> code ( 400 ) -> status ( 'error' ) -> url ( guard_url ( 'block/block/' . $ block -> getRouteKey ( ) ) ) -> redirect ( ) ; } }
Remove the block.

@param Model   $block

@return Response
Remove the block .