⚝
One Hat Cyber Team
⚝
Your IP:
18.222.175.173
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
rahulraj
/
public_html
/
core
/
app
/
Models
/
View File Name :
User.php
<?php namespace App\Models; use Illuminate\Foundation\Auth\User as Authenticatable; class User extends Authenticatable { protected $fillable = [ 'first_name', 'last_name', 'phone', 'email', 'password', 'photo', 'email_token', 'ship_address1', 'ship_address2', 'ship_zip', 'ship_city', 'ship_country', 'ship_company', 'bill_address1', 'bill_address2', 'bill_zip', 'bill_city', 'bill_country', 'bill_company', 'state_id' ]; protected $hidden = [ 'password' ]; public function state() { return $this->belongsTo('App\Models\State')->withDefault(); } public function products() { return $this->hasMany('App\Models\Item','vendor_id')->orderby('id','desc'); } public function orders() { return $this->hasMany('App\Models\Order'); } public function wishlists() { return $this->hasMany('App\Models\Wishlist'); } public function reviews() { return $this->hasMany('App\Models\Review'); } public function notifications() { return $this->hasMany('App\Models\Notification'); } public function socialProviders() { return $this->hasMany('App\Models\SocialProvider'); } public function withdraws() { return $this->hasMany('App\Models\Withdraw','vendor_id')->orderby('id','desc'); } public function displayName() { return $this->first_name.' '.$this->last_name; } public function wishlistCount() { return $this->wishlists()->whereHas('item', function($query) { $query->where('status', '=', 1); })->count(); } }