HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/owlcrm/app/Models/Reminder.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Reminder extends Model
{
    use SoftDeletes;
    protected $table = 'reminders';
    use HasFactory;

    const Lead = 'lead';
    // const NO = 0;

    protected $fillable = [
        'reminder_to',
        'created_by',
        'entity_type',
        'entity_id',
        'description',
        'reminder_date',
        'is_notified',
        'email_notification',
        'status',
        'user_id',
    ];

    protected $attributes = [
        'status' => 1,
    ];
    const Entity = [

        'lead' => 'Lead',
        'user' => 'User',

    ];
    const EntityId = [
        //'invoice' => 'Invoice',
        '0' => 'Lead',
        '1' => 'User',
    ];

    public function user()  /*  used for reminder and add reminder in leads*/
    {
        return $this->belongsTo(User::class, 'reminder_to', 'id');
    }
    public function created_by_user()
    {
        return $this->belongsTo(User::class, 'created_by', 'id');
    }
    public function reminder_user_get()
    {
        return $this->belongsTo(User::class, 'entity_id', 'id');
    }
    
 

}