Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
added logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Teddy Roncin committed Aug 30, 2023
1 parent ec66d7f commit b77ac13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/Admin/PermController.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ public function doShotgun($id) {

if($perm->nbr_permanenciers > $perm->permanenciers()->count()){
$perm->permanenciers()->attach($user->id, ['respo' => false]);
file_put_contents('./logs.log', '['.date('j/n/o H:i:s').']'.' '.$user->id.' vient de shotgun la perm '.$id."\n", FILE_APPEND);
return $redirection->withSuccess('Tu as bien été ajouté à la perm !');
} else {
return $redirection->withError('Cette perm est complète !');
Expand Down Expand Up @@ -436,6 +437,7 @@ public function doUnshotgun($id) {
return $redirection->withError('Trop tard, tu ne peux pas quitter une perm moins de 48 heure avant le début.');
}
$perm->permanenciers()->detach($user->id);
file_put_contents('./logs.log', '['.date('j/n/o H:i:s').']'.' '.$user->id.' vient de quitter la perm '.$id."\n", FILE_APPEND);
return $redirection->withSuccess('Tu as bien quitté la perm.');
}

Expand Down
Empty file added public/logs.log
Empty file.

0 comments on commit b77ac13

Please sign in to comment.