app/Http/Controllers/ClientController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Client  $client
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Request $request,Client $client)
    {
        if($client){
            if(file_exists(public_path($client->image))){
                unlink(public_path($client->image));
            }
            $client->delete();
            $request->session()->flash('success', 'Client Deleted successfully');
        }
        return redirect()->back();
    }
public function destroy ( Request $ request , Client $ client ) { if ( $ client ) { if ( file_exists ( public_path ( $ client -> image ) ) ) { unlink ( public_path ( $ client -> image ) ) ; } $ client -> delete ( ) ; $ request -> session ( ) -> flash ( 'success' , 'Client Deleted successfully' ) ; } return redirect ( ) -> back ( ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .