芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/portpulselogistics.com/Modules/Cargo/Entities/Branch.php
addMediaCollection('avatar')->singleFile(); } public function registerMediaConversions(Media $media = null): void { $this->addMediaConversion('preview')->fit(Manipulations::FIT_CROP, 300, 300)->nonQueued(); } protected static function newFactory() { return \Modules\Cargo\Database\factories\BranchFactory::new(); } public function getBranches($query) { if(auth()->user()->role == 3){ $branch = Branch::where('user_id',auth()->user()->id)->pluck('id')->first(); return $query->where('is_archived', 0)->where('id', $branch); } return $query->where('is_archived', 0); } }