route('dashboard'); } if (! $this->hasPermission($organization, 'organizations:view')) { return redirect()->route('dashboard'); } $owner = $organization->owner; return Inertia::render('Teams/Show', [ 'team' => [ 'id' => $organization->getKey(), 'name' => $organization->name, 'currency' => $organization->currency, 'owner' => [ 'id' => $owner->getKey(), 'name' => $owner->name, 'profile_photo_url' => $owner->profile_photo_url, ], ], 'currencies' => array_map(function (Currency $currency): string { return $currency->getName(); }, ISOCurrencyProvider::getInstance()->getAvailableCurrencies()), 'permissions' => [ 'canDeleteTeam' => true, 'canUpdateTeam' => true, ], ]); } }