Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux server335.web-hosting.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : cardxfeb ( 2452)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /home/cardxfeb/public_html/app/Livewire/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/cardxfeb/public_html/app/Livewire/VcardSubscriber.php
<?php

namespace App\Livewire;

use Rappasoft\LaravelLivewireTables\DataTableComponent;
use Rappasoft\LaravelLivewireTables\Views\Column;
use Illuminate\Database\Eloquent\Builder;
use App\Models\VcardEmailSubscription;


class VcardSubscriber extends LivewireTableComponent
{
    protected $model = VcardEmailSubscription::class;

    public bool $showButtonOnHeader = false;

    protected $listeners = ['refresh' => '$refresh', 'resetPageTable'];

    public $vcardId;

    public function mount($vcardId)
    {
        $this->vcardId = $vcardId;
    }


    public function configure(): void
    {
        $this->setPrimaryKey('id');
        $this->setPageName('email-subscriber-table');
        $this->setDefaultSort('created_at','desc');
        $this->setColumnSelectStatus(false);
        $this->setQueryStringStatus(false);
        $this->resetPage('email-subscriber-table');

    }

    public function columns(): array
    {
        return [
            Column::make("Email", "email")
                ->sortable()->searchable(),
            Column::make("Created at", "created_at")
                ->sortable(),
        ];
    }
    public function builder(): Builder
    {
         return VcardEmailSubscription::where('vcard_id','=', $this->vcardId);
    }
    public function placeholder()
    {
        return view('lazy_loading/without-listing-skelecton');
    }
}

Al-HUWAITI Shell