fixed #33
This commit is contained in:
parent
201ceea38e
commit
88e62a8354
@ -22,7 +22,7 @@ class Companies extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$companies = Auth::user()->companies()->collect();
|
||||
$companies = Company::collect();
|
||||
|
||||
foreach ($companies as $company) {
|
||||
$company->setSettings();
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models\Company;
|
||||
|
||||
use Auth;
|
||||
use EloquentFilter\Filterable;
|
||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
@ -194,7 +195,7 @@ class Company extends Eloquent
|
||||
$input = $request->input();
|
||||
$limit = $request->get('limit', setting('general.list_limit', '25'));
|
||||
|
||||
return $this->filter($input)->sortable($sort)->paginate($limit);
|
||||
return Auth::user()->companies()->filter($input)->sortable($sort)->paginate($limit);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user