app/Http/Controllers/CategoryController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Category  $category
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Category $category)
    {
        if ($category->delete()) {
            return redirect()->back()->with('success', 'Category deleted successfully');
        }
        return redirect()->back()->with('failed', 'Some error occured!!! Try again');
    }
public function destroy ( Category $ category ) { if ( $ category -> delete ( ) ) { return redirect ( ) -> back ( ) -> with ( 'success' , 'Category deleted successfully' ) ; } return redirect ( ) -> back ( ) -> with ( 'failed' , 'Some error occured!!! Try again' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .