diff --git a/app/Http/Controllers/TicketController.php b/app/Http/Controllers/TicketController.php index a83851f..d7a5699 100644 --- a/app/Http/Controllers/TicketController.php +++ b/app/Http/Controllers/TicketController.php @@ -47,7 +47,7 @@ class TicketController extends Controller ]); $projectSlug = Str::slug(Project::find($projectId)->name); $ticketId = Ticket::count() + 1; - $fileName = Str::slug($projectSlug) . "-" . ($type === 0 ? "bug" : "evo") . "-" . $ticketId . "." . $fileTicket->extension(); + $fileName = Str::slug($projectSlug) . "-" . ($type === "0" ? "bug" : "evo") . "-" . $ticketId . "." . $fileTicket->extension(); $fileTicket->move(public_path('fichiers/' . $projectSlug . "/" . $ticketId . "/"), $fileName); } @@ -97,7 +97,7 @@ class TicketController extends Controller if (file_exists(public_path('fichiers/' . $ticket->project->name . '/' . $ticket->id . '/') . $ticket->file)) unlink(public_path('fichiers/' . $ticket->project->name . '/' . $ticket->id . '/') . $ticket->file); $projectSlug = Str::slug(Project::find($projectId)->name); - $fileName = Str::slug($projectSlug) . "-" . ($type === 0 ? "bug" : "evo") . "-" . $ticket->id . "." . $fileTicket->extension(); + $fileName = Str::slug($projectSlug) . "-" . ($type === "0" ? "bug" : "evo") . "-" . $ticket->id . "." . $fileTicket->extension(); $fileTicket->move(public_path('fichiers/' . $projectSlug . "/" . $ticket->id . "/"), $fileName); }