芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/reginaeigbe.com/folder/admin/tmp/app/Http/Controllers/Admin/TeamController.php
search ?: ''; $data['sort']['column'] = $request->sort['column'] ?? 'name'; $data['sort']['order'] = $request->sort['order'] ?? 'asc'; $data['teams'] = $repository->paginateSearchResult($data['search'], $data['sort']); return Inertia::render('Teams/Index', $data); } /** * Create team */ public function create(): Response { return Inertia::render('Teams/Create'); } /** * Store team */ public function store(TeamStoreRequest $request, TeamRepository $repository): RedirectResponse { $repository->store($request); return redirect()->route('admin.teams.index')->with('success', 'Team successfully created'); } /** * Display the specified resource. */ public function show(string $id) { // } /** * Edit team */ public function edit(Team $team): Response { $data['team'] = $team; return Inertia::render('Teams/Edit', $data); } /** * Update team */ public function update(TeamUpdateRequest $request, Team $team, TeamRepository $repository): RedirectResponse { $repository->update($request, $team); return redirect()->route('admin.teams.index')->with('success', 'Team successfully updated'); } /** * Delete team */ public function destroy(Team $team, TeamRepository $repository): RedirectResponse { $repository->destroy($team); return back()->with('success', 'Team successfully deleted'); } /** * Bulk delete */ public function bulkDelete(Request $request, TeamRepository $repository): RedirectResponse { $repository->bulkDelete($request); return back()->with('success', 'Selected team successfully deleted'); } }