Deploy Ladill Woo Manager / deploy (push) Failing after 2s
Standalone app with SSO shell, WordPress plugin connect flow, webhook ingest, fulfillment inbox, and plugin activation API — no payment processing. Co-authored-by: Cursor <cursoragent@cursor.com>
46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
<?php
|
|
|
|
use App\Models\User;
|
|
|
|
if (! function_exists('invoice_money')) {
|
|
function invoice_money(int $minor, string $currency = 'GHS'): string
|
|
{
|
|
return $currency.' '.number_format($minor / 100, 2);
|
|
}
|
|
}
|
|
|
|
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_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, '/') : '');
|
|
}
|
|
}
|