/
home
/
old_henza
/
server
/
app
/
Models
/
File Upload :
llllll
Current File: /home/old_henza/server/app/Models/SingleCustomer.php
<?php namespace App\Models; use App\DB\Selector; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Support\Facades\Hash; use Rooyesh\Wallet\models\Transaction; class SingleCustomer extends Authenticatable { use HasFactory; use SoftDeletes; use Selector; //protected $connection = 'pgsql'; protected $table = 'login'; public $fillable=[ 'id', 'password', 'username', 'lname', 'fname', 'name', 'phone', 'email', 'user_type', 'is_active', 'last_login', 'token_sms', 'percent', 'birth_day', 'branch_id' ]; protected $hidden = ['password']; public function setPasswordAttribute($value) { $this->attributes['password'] = Hash::make($value); } public function transaction(){ return $this->hasMany(Transaction::class(),'owner'); } public function branch() { return $this->belongsTo(Branch::class); } }
Copyright ©2k19 -
Hexid
|
Tex7ure