. */ namespace App\Http\Controllers\Api\Admin; use App\Http\Controllers\Controller; use App\Http\Requests\ExternalAccount\CreateUpdate; use App\Services\AccountService; use Illuminate\Http\Request; class ExternalAccountController extends Controller { public function show(Request $request, int $accountId) { return $request->space->accounts()->findOrFail($accountId)->external()->firstOrFail(); } public function store(CreateUpdate $request, int $accountId) { return (new AccountService)->storeExternalAccount($request, $accountId); } public function destroy(int $accountId) { return (new AccountService)->deleteExternalAccount($accountId); } }