app/Http/Controllers/TheBlog/CategoryController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Category  $category
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy($id)
    {
        $category = Category::findOrFail($id);
        $category->delete() ;
        return $this->sendResponse(new CategoryResource($category), 'Category deleted successfully.');
 }
public function destroy ( $ id ) { $ category = Category :: findOrFail ( $ id ) ; $ category -> delete ( ) ; return $ this -> sendResponse ( new CategoryResource ( $ category ) , 'Category deleted successfully.' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .