mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Merge pull request #12254 from akemidx/documentating_something
Commenting on a scope in Models/Company.php
This commit is contained in:
commit
88291cadc1
|
@ -73,6 +73,10 @@ final class Company extends SnipeModel
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scoping table queries, determining if a logged in user is part of a company, and only allows
|
||||
* that user to see items associated with that company
|
||||
*/
|
||||
private static function scopeCompanyablesDirectly($query, $column = 'company_id', $table_name = null)
|
||||
{
|
||||
if (Auth::user()) {
|
||||
|
|
Loading…
Reference in a new issue