- add cv info

This commit is contained in:
2023-06-16 14:23:34 +02:00
parent 390c5b8087
commit d35421a97e
5 changed files with 111 additions and 0 deletions

View File

@@ -13,6 +13,10 @@ class CVController extends Controller
{
public function show(CV $cv): JsonResource
{
$cv->info()
->create([
'ip' => $_SERVER['REMOTE_ADDR'],
]);
$cv->update(['views' => $cv->views+=1]);
return new CVResource($cv);