app/Http/Controllers/Admin/ServiceController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Service  $service
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Service $service)
    {
        if(!empty($service->service_image)){
            if(file_exists(public_path('storage/services/' . $service->service_image))){
                unlink(public_path('storage/services/' . $service->service_image));
            }
        }
        $service->delete();
        return redirect(route('admin.services.index'))->with('success','Service successfully Delete.');
    }
public function destroy ( Service $ service ) { if ( ! empty ( $ service -> service_image ) ) { if ( file_exists ( public_path ( 'storage/services/' . $ service -> service_image ) ) ) { unlink ( public_path ( 'storage/services/' . $ service -> service_image ) ) ; } } $ service -> delete ( ) ; return redirect ( route ( 'admin.services.index' ) ) -> with ( 'success' , 'Service successfully Delete.' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .