芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/laravel/jetstream/src/Http/Controllers/Inertia/TeamMemberController.php
findOrFail($teamId); if (Features::sendsTeamInvitations()) { app(InvitesTeamMembers::class)->invite( $request->user(), $team, $request->email ?: '', $request->role ); } else { app(AddsTeamMembers::class)->add( $request->user(), $team, $request->email ?: '', $request->role ); } return back(303); } /** * Update the given team member's role. * * @param \Illuminate\Http\Request $request * @param int $teamId * @param int $userId * @return \Illuminate\Http\RedirectResponse */ public function update(Request $request, $teamId, $userId) { app(UpdateTeamMemberRole::class)->update( $request->user(), Jetstream::newTeamModel()->findOrFail($teamId), $userId, $request->role ); return back(303); } /** * Remove the given user from the given team. * * @param \Illuminate\Http\Request $request * @param int $teamId * @param int $userId * @return \Illuminate\Http\RedirectResponse */ public function destroy(Request $request, $teamId, $userId) { $team = Jetstream::newTeamModel()->findOrFail($teamId); app(RemovesTeamMembers::class)->remove( $request->user(), $team, $user = Jetstream::findUserByIdOrFail($userId) ); if ($request->user()->id === $user->id) { return redirect(config('fortify.home')); } return back(303); } }