Files
zemailnator/app/Livewire/Home.php
idevakk c312ec3325 feat: Prepare Zemailnator for Dokploy deployment
- Add highly optimized Dockerfile with Nginx and PHP-FPM 8.4
- Add docker-compose.yml configured with Redis and MariaDB 10.11
- Implement entrypoint.sh and supervisord.conf for background workers
- Refactor legacy IMAP scripts into scheduled Artisan Commands
- Secure app by removing old routes with hardcoded basic auth credentials
- Configure email attachments to use Laravel Storage instead of insecure public/tmp
2026-02-28 23:17:39 +05:30

30 lines
606 B
PHP

<?php
namespace App\Livewire;
use App\Models\ZEmail;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Livewire\Component;
class Home extends Component
{
protected $listeners = ['fetchMessages' => 'checkIfAnyMessage'];
public function checkIfAnyMessage()
{
$email = ZEmail::getEmail();
$messages = ZEmail::getMessages($email);
if (count($messages['data']) > 0) {
return to_route('mailbox');
}
return null;
}
public function render(): Factory|View
{
return view('livewire.home');
}
}