Delete client

This commit is contained in:
Peter Papp
2021-04-28 18:15:33 +02:00
parent b37edd298a
commit 248825f2d1
4 changed files with 52 additions and 2 deletions

View File

@@ -66,4 +66,17 @@ class ClientController extends Controller
new OasisClientResource($client), 201
);
}
/**
* @param Client $client
* @throws \Exception
*/
public function destroy(Client $client)
{
if ($client->user_id === Auth::id()) {
$client->delete();
return response('Done', 204);
}
}
}