<br />
<b>Warning</b>:  Undefined variable $auth in <b>/home/pevo0181/public_html/pia-soft.com/cleania/routes/index.php</b> on line <b>542</b><br />
<br />
<b>Warning</b>:  Trying to access array offset on value of type null in <b>/home/pevo0181/public_html/pia-soft.com/cleania/routes/index.php</b> on line <b>542</b><br />
<?php

namespace App\Models;

use App\Models\User;
use App\Models\Center;
use App\Models\Patient;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class Card extends Model
{
    use HasFactory, SoftDeletes;

    protected $table        = 'cards';
    protected $primaryKey   = 'card_id';

    protected $fillable = [
        "center_id",
        "user_id",
        "patient_id",
        "vaccine_id",
        "cad_generate_date",
        "cad_expire_date",
        "cad_doc_type",
    ];

    const CREATED_AT = 'cad_created_at';
    const UPDATED_AT = 'cad_updated_at';
    const DELETED_AT = 'cad_deleted_at';

    protected $casts = [
        'cad_created_at' => 'datetime:Y-m-d m:i:s',
        'cad_updated_at' => 'datetime:Y-m-d m:i:s',
        'cad_deleted_at' => 'datetime:Y-m-d m:i:s',
    ];


    public functio