app/Http/Controllers/BrandController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Brand  $brand
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Request $request,Brand $brand)
    {
        $brand->delete();
        return back()->with('success','Brand Trashed Successfully');
    }
public function destroy ( Request $ request , Brand $ brand ) { $ brand -> delete ( ) ; return back ( ) -> with ( 'success' , 'Brand Trashed Successfully' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .
// if($cat->subBrand->count() == 0){ //     Brand::findOrFail($brand)->delete(); //     return back()->with('success','Brand Trashed Successfully'); // } // else{ //     return back()->with('error','Brand has Sub Brand'); // }