Deploy Ladill Transfer / deploy (push) Successful in 29s
Transfers now lists all shares with filters and pagination; Files becomes a selectable cloud view with download, share, delete, move, and open-in-email actions. Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.4 KiB
PHP
48 lines
1.4 KiB
PHP
<?php
|
|
|
|
use App\Models\User;
|
|
|
|
if (! function_exists('ladill_account')) {
|
|
/**
|
|
* The account the current request acts within — the owner User. Defaults to
|
|
* the authenticated user; a team member who switched accounts gets the owner.
|
|
* Set by the SetActingAccount middleware.
|
|
*/
|
|
function ladill_account(): ?User
|
|
{
|
|
$request = request();
|
|
|
|
return $request->attributes->get('actingAccount') ?? $request->user();
|
|
}
|
|
}
|
|
|
|
if (! function_exists('ladill_domains_url')) {
|
|
function ladill_domains_url(string $path = ''): string
|
|
{
|
|
return 'https://'.config('app.domains_domain').($path !== '' ? '/'.ltrim($path, '/') : '');
|
|
}
|
|
}
|
|
|
|
if (! function_exists('ladill_webmail_url')) {
|
|
function ladill_webmail_url(string $path = ''): string
|
|
{
|
|
$base = rtrim((string) config('services.ladill_webmail.url', 'https://mail.ladill.com'), '/');
|
|
|
|
return $path !== '' ? $base.'/'.ltrim($path, '/') : $base;
|
|
}
|
|
}
|
|
|
|
if (! function_exists('ladill_account_url')) {
|
|
function ladill_account_url(string $path = ''): string
|
|
{
|
|
return 'https://'.config('app.account_domain').($path !== '' ? '/'.ltrim($path, '/') : '');
|
|
}
|
|
}
|
|
|
|
if (! function_exists('ladill_servers_url')) {
|
|
function ladill_servers_url(string $path = ''): string
|
|
{
|
|
return 'https://'.config('app.servers_domain').($path !== '' ? '/'.ltrim($path, '/') : '');
|
|
}
|
|
}
|