mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Commenting on a scope in Models/Company.php
This commit is contained in:
parent
29c2ff56ec
commit
133d6ffa50
|
@ -73,6 +73,10 @@ final class Company extends SnipeModel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adding scope to table queires, where only authorized users will be able to see a company's ID value
|
||||||
|
*
|
||||||
|
*/
|
||||||
private static function scopeCompanyablesDirectly($query, $column = 'company_id', $table_name = null)
|
private static function scopeCompanyablesDirectly($query, $column = 'company_id', $table_name = null)
|
||||||
{
|
{
|
||||||
if (Auth::user()) {
|
if (Auth::user()) {
|
||||||
|
|
Loading…
Reference in a new issue