芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/tblonline.org/app/Models/User.php
'datetime', ]; public function getCreatedAtAttribute($value) { $date_format = get_date_format(); $time_format = get_time_format(); return \Carbon\Carbon::parse($value)->format("$date_format $time_format"); } public function role() { return $this->belongsTo('App\Models\Role', 'role_id')->withDefault(['name' => _lang('Default')]); } public function branch() { return $this->belongsTo('App\Models\Branch', 'branch_id')->withDefault(['name' => _lang('Default')]); } public function transactions() { return $this->hasMany('App\Models\Transaction', 'user_id')->with('currency')->orderBy('id', 'desc'); } public function loans() { return $this->hasMany('App\Models\Loan', 'borrower_id')->with('currency')->orderBy('id', 'desc'); } public function fixed_deposits() { return $this->hasMany('App\Models\FixedDeposit', 'user_id')->with('currency')->orderBy('id', 'desc'); } public function support_tickets() { return $this->hasMany('App\Models\SupportTicket', 'user_id')->orderBy('id', 'desc'); } }