selects de projets par ordre alpha
This commit is contained in:
parent
f770e77d98
commit
f69f19b57c
1 changed files with 2 additions and 2 deletions
|
|
@ -54,7 +54,7 @@ class TicketController extends Controller
|
|||
$tickets = $this->filterTickets($tickets, $request);
|
||||
$tickets = $tickets->paginate();
|
||||
|
||||
$projects = Project::select('id', 'name')->get();
|
||||
$projects = Project::select('id', 'name')->orderBy('name')->get();
|
||||
|
||||
return view('ticket.index', compact('tickets', 'projects'));
|
||||
}
|
||||
|
|
@ -141,7 +141,7 @@ class TicketController extends Controller
|
|||
|
||||
public function create()
|
||||
{
|
||||
$projects = Project::all();
|
||||
$projects = Project::orderBy('name')->get();
|
||||
if (!count($projects)) {
|
||||
return redirect()->route('project.create')
|
||||
->with('warning', 'Vous devez tout d\'abord créer un projet pour y ajouter un ticket');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue