⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.187
Server IP:
13.127.59.50
Server:
Linux ip-172-31-46-210 5.15.0-1033-aws #37~20.04.1-Ubuntu SMP Fri Mar 17 11:39:30 UTC 2023 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.3-4ubuntu2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
styleage_v3
/
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_area', 'ship_country', 'ship_company', 'bill_address1', 'bill_address2', 'bill_zip', 'bill_city', 'bill_area', 'bill_country', 'bill_company', 'state_id', 'otp', 'email_otp_verified', ]; 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 getFullNameAttribute() { return $this->first_name . ' ' . $this->last_name; } public function wishlistCount() { return $this->wishlists()->whereHas('item', function($query) { $query->where('status', '=', 1); })->count(); } }