- Fix img

This commit is contained in:
Vincent BRIDIER 2020-11-24 14:30:05 +01:00
parent 6de09e3499
commit 52a37b8039

View file

@ -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);
}