Initial Ladill Hosting app with Gitea deploy pipeline.
Deploy Ladill Hosting / deploy (push) Failing after 17s
Deploy Ladill Hosting / deploy (push) Failing after 17s
Shared web hosting extracted from the platform monolith, with CI deploy to /var/www/ladill-hosting matching Bird/Domains/Email. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Email;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\EmailDomain\EmailDomainClient;
|
||||
use App\Services\Mailbox\MailboxClient;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class OverviewController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private MailboxClient $mailboxes,
|
||||
private EmailDomainClient $domains,
|
||||
) {}
|
||||
|
||||
public function index(Request $request): View
|
||||
{
|
||||
$pid = (string) ladill_account()->public_id;
|
||||
$mailboxes = [];
|
||||
$domains = [];
|
||||
$error = null;
|
||||
|
||||
try {
|
||||
$mailboxes = $this->mailboxes->forUser($pid);
|
||||
$domains = $this->domains->forUser($pid);
|
||||
} catch (\Throwable $e) {
|
||||
report($e);
|
||||
$error = 'Some data could not be loaded right now.';
|
||||
}
|
||||
|
||||
return view('email.dashboard', [
|
||||
'mailboxCount' => count($mailboxes),
|
||||
'domainCount' => count($domains),
|
||||
'verifiedDomainCount' => collect($domains)->where('active', true)->count(),
|
||||
'recent' => collect($mailboxes)->take(5)->all(),
|
||||
'error' => $error,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user