CasperSecurity

Current Path : /var/www/orientalss.com/app/Models/
Upload File :
Current File : /var/www/orientalss.com/app/Models/EmployeeRegistration.php

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Laratrust\Traits\LaratrustUserTrait;
use Laravel\Scout\Searchable;

class EmployeeRegistration extends Model
{
    use HasFactory;
    use Searchable;
    use SoftDeletes;
    use LaratrustUserTrait;
    public $guarded = [];

    public function toSearchableArray()
    {
        return [
            'name' => $this->name,
            'employee_id' => $this->employee_id,
            'email_id' => $this->email_id,
            'mobile_no' => $this->mobile_no,
        ];
    }

    public function user(){
        return $this->belongsTo(User::class,'user_id')->select('id','name','email');
    }

    public function getDesignation(){
        return $this->belongsTo(Designation::class,'designation','id');
    }

    public function manager(){
        return $this->belongsTo(EmployeeRegistration::class,'manager_id')->select('id','name','designation');
    }

    public function hr(){
        return $this->belongsTo(EmployeeRegistration::class,'hr_id')->select('id','name','designation');
    }

    public function role(){
        return $this->belongsTo(Role::class,'role_id')->select('id','display_name');
    }

    public function team(){
        return $this->belongsTo(Team::class,'team_id')->select('id','display_name');
    }

    public function employeetype(){
        return $this->belongsTo(EmployeeType::class,'employment_status')->select('id','emp_type_name');
    }

    public function city(){
        return $this->belongsTo(SettingsCity::class,'city_id')->select('id','city_name');
    }

    public function employeeattendance(){
        return $this->hasMany(EmployeeAttendance::class,'employee_id');
    }

    public function employeeundermanger(){
        return $this->hasMany(EmployeeRegistration::class,'manager_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