CasperSecurity

Current Path : /var/www/hrms.uiet.co.in/app/Models/
Upload File :
Current File : /var/www/hrms.uiet.co.in/app/Models/LeaveDays.php

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use  Illuminate\Database\Eloquent\SoftDeletes;
use Spatie\Activitylog\LogOptions;
use Spatie\Activitylog\Traits\LogsActivity;

class LeaveDays extends Model
{
    use HasFactory;
    protected $guarded=[];

    use LogsActivity;
    public function getActivitylogOptions(): LogOptions
    {
        return LogOptions::defaults()
            ->logAll()
            ->useLogName('system')
            ->setDescriptionForEvent(fn(string $eventName) => "This model has been {$eventName}");
    }

    public static function search($search)
    {
        return empty($search) ? static::query()
            : static::query()
                ->where('leave_code', 'like', '%' . $search . '%');

    }


    public function manageLeave()
    {
        return $this->belongsTo(ManageLeave::class, 'manage_leave_id','id');
    }

    public function getLeaveType(){
        return $this->belongsTo(LeaveType::class,'leave_type_id');
    }

     public function getEmployeeRegistration(){
        return $this->belongsTo(EmployeeRegistration::class,'employee_id');
    }
    
}
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY