AnonSec Shell
Server IP : 172.67.168.138  /  Your IP : 216.73.216.227   [ Reverse IP ]
Web Server : Apache
System : Linux frog 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web13 ( 5017)
PHP Version : 8.3.31
Disable Function : NONE
Domains : 41 Domains
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/clients/client12/web13/web/ahelos/app/Models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/clients/client12/web13/web/ahelos/app/Models/User.php
<?php

namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use App\Notifications\CustomResetPasswordNotification;


class User extends Authenticatable
{
    use HasApiTokens, HasFactory, Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'gender',
        'fname',
        'lname',
        'phone',
        'email',
        'password',
        'terms',
        'language',
        'facebook_id',
        'is_locked',
    ];

    /**
     * The attributes that should be hidden for serialization.
     *
     * @var array<int, string>
     */
    protected $hidden = [
        'password',
        'remember_token',
    ];

    /**
     * The attributes that should be cast.
     *
     * @var array<string, string>
     */
    protected $casts = [
        'email_verified_at' => 'datetime',
        'is_locked' => 'boolean',
    ];

    /**
     * Send the password reset notification.
     *
     * @param  string  $token
     * @return void
     */
    public function sendPasswordResetNotification($token)
    {
        $this->notify(new CustomResetPasswordNotification($token));
    }

    public function getFullNameAttribute(){
      return $this->fname . ' ' . $this->lname;
    }

    public function orders(){
      return $this->hasMany(Order::class);
    }

    public function addresses(){
      return $this->hasMany(UserAddress::class);
    }

    public function credits(){
      return $this->hasMany(UserCredit::class)->latest();
    }


    public static function scopeFilter ($query, $filters) {
      $query->when($filters['fname'] ?? false, fn ($query, $fname) => $query->where('fname', 'LIKE', '%'.$fname.'%'));
      $query->when($filters['lname'] ?? false, fn ($query, $lname) => $query->where('lname', 'LIKE',  '%'.$lname.'%'));
      $query->when($filters['email'] ?? false, fn ($query, $email) => $query->where('email', 'LIKE', '%'.$email.'%'));
      $query->when($filters['phone'] ?? false, fn ($query, $phone) => $query->where('phone', 'LIKE',  '%'.$phone.'%'));
      $query->when($filters['language'] ?? false, fn ($query, $language) => $query->where('language', $language));

    }
}

Anon7 - 2022
AnonSec Team