芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/portpulselogistics.com/Modules/Cargo/Entities/Receiver.php
user()->role == 1){ return $query->where('is_archived', 0); }elseif(auth()->user()->role == 3){ $branch = Branch::where('user_id',auth()->user()->id)->pluck('id')->first(); }elseif(auth()->user()->can('manage-customers') && auth()->user()->role == 0){ $branch = Staff::where('user_id',auth()->user()->id)->pluck('branch_id')->first(); } return $query->where('is_archived', 0)->where('branch_id', $branch); } }