1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

patch for basic web views

This commit is contained in:
David Bomba 2019-05-22 13:52:38 +10:00
parent c8c965384d
commit d7fa857f10
2 changed files with 9 additions and 6 deletions

View File

@ -38,10 +38,13 @@ class HeaderComposer
{
if(!auth()->user())
return [];
/
//companies
$companies = auth()->user()->companies;
$companies = auth()->user()->companies
//companies
$data['current_company'] = $companies->first();
$data['companies'] = $companies;
/*
$data['current_company'] = $companies->first(function ($company){
return $company->id == auth()->user()->company()->id;
});
@ -49,7 +52,7 @@ class HeaderComposer
$data['companies'] = $companies->reject(function ($company){
return $company->id == auth()->user()->company()->id;
});
*/
return $data;
}

View File

@ -22,7 +22,7 @@ class ComposerServiceProvider extends ServiceProvider
*/
public function boot()
{
/*
view()->composer('*', 'App\Http\ViewComposers\HeaderComposer');
view()->composer(
@ -31,7 +31,7 @@ class ComposerServiceProvider extends ServiceProvider
],
'App\Http\ViewComposers\TranslationComposer'
);
*/
}
/**