CasperSecurity

Current Path : /var/www/hrms.uiet.co.in/app/Models/
Upload File :
Current File : /var/www/hrms.uiet.co.in/app/Models/TravelRequest.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 TravelRequest extends Model
{
    use HasFactory,SoftDeletes;

    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('travel_from', 'like', '%' . $search . '%')
                ->orWhere('travel_to', 'like', '%' . $search . '%')
                ->orWhere('travel_reason', 'like', '%' . $search . '%');

    }

    public function getEmployee()
    {
        return $this->belongsTo(EmployeeProfile::class,'employee_profile_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