app/Http/Controllers/SubCategoryController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\SubCategory  $subCategory
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(SubCategory $subcategory)
    {
        if ($subcategory->delete()) {
            return redirect()->back()->with('success', 'Sub Category deleted successfully');
        }
        return redirect()->back()->with('failed', 'Some error occured!!! Try again');
    }
public function destroy ( SubCategory $ subcategory ) { if ( $ subcategory -> delete ( ) ) { return redirect ( ) -> back ( ) -> with ( 'success' , 'Sub 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 .