app/Http/Controllers/TestimonialController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Testimonial  $testimonial
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Testimonial $testimonial)
    {
        $this->authorize("delete", Testimonial::class);
        Storage::disk("public")->delete("img/" .$testimonial->photo);
        $testimonial->delete();
        return redirect()->route('testimonials.index');
    }
public function destroy ( Testimonial $ testimonial ) { $ this -> authorize ( " delete " , Testimonial :: class ) ; Storage :: disk ( " public " ) -> delete ( " img/ " . $ testimonial -> photo ) ; $ testimonial -> delete ( ) ; return redirect ( ) -> route ( 'testimonials.index' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .