/** * Remove the specified resource from storage. * * @param Client $client * @return Response * @throws \Exception * @internal param int $id */ public function destroy(Client $client) { $client->addresses()->delete(); $client->bankDetails()->delete(); $propertyd = $client->property()->get(); foreach ($propertyd as $item) { $item->addresses()->delete(); } $client->property()->delete(); $client->delete(); Session::flash('flash_message', 'Owner successfully deleted!'); return redirect()->action('OwnerController@index'); }