Search Results
Consumable.php
Go to the documentation of this file.
82 return $this->hasMany('\App\Models\Actionlog', 'consumable_id')->where('asset_type', '=', 'consumable')->orderBy('created_at', 'desc')->withTrashed();
88 return $this->belongsToMany('\App\Models\User', 'consumables_users', 'consumable_id', 'assigned_to')->withPivot('user_id')->withTrashed()->withTimestamps();
93 return $this->belongsToMany('\App\Models\User', 'consumables_users', 'consumable_id', 'assigned_to')->count();
109 } elseif ((Setting::getSettings()->default_eula_text) && ($this->category->use_default_eula=='1')) {
176 return $query->join('categories', 'consumables.category_id', '=', 'categories.id')->orderBy('categories.name', $order);
189 return $query->leftJoin('locations', 'consumables.location_id', '=', 'locations.id')->orderBy('locations.name', $order);
203 return $query->leftJoin('companies', 'consumables.company_id', '=', 'companies.id')->orderBy('companies.name', $order);
scopeOrderCompany($query, $order)
Query builder scope to order on company.
Definition: Consumable.php:201
scopeOrderCategory($query, $order)
Query builder scope to order on company.
Definition: Consumable.php:174
Definition: Accessory.php:2
Definition: Consumable.php:14
scopeOrderLocation($query, $order)
Query builder scope to order on company.
Definition: Consumable.php:187
scopeTextSearch($query, $search)
Query builder scope to search on text.
Definition: Consumable.php:141