Suggestions enhancement
This commit is contained in:
parent
ebda456f21
commit
d23b3b333a
@ -5,11 +5,11 @@ namespace App\Http\ViewComposers;
|
|||||||
use Auth;
|
use Auth;
|
||||||
use App\Utilities\Updater;
|
use App\Utilities\Updater;
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
use App\Traits\Modules;
|
use App\Traits\Modules as RemoteModules;
|
||||||
|
|
||||||
class Header
|
class Header
|
||||||
{
|
{
|
||||||
use Modules;
|
use RemoteModules;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bind data to the view.
|
* Bind data to the view.
|
||||||
@ -60,9 +60,7 @@ class Header
|
|||||||
|
|
||||||
$updates = count(Updater::all());
|
$updates = count(Updater::all());
|
||||||
|
|
||||||
if (!env('APP_INSTALLED', false)) {
|
$this->loadSuggestions();
|
||||||
$this->loadSuggestions();
|
|
||||||
}
|
|
||||||
|
|
||||||
$view->with([
|
$view->with([
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
|
@ -20,7 +20,7 @@ class Suggestions
|
|||||||
public function compose(View $view)
|
public function compose(View $view)
|
||||||
{
|
{
|
||||||
// No need to add suggestions in console
|
// No need to add suggestions in console
|
||||||
if (app()->runningInConsole() || !env('APP_INSTALLED', false)) {
|
if (app()->runningInConsole() || !env('APP_INSTALLED')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class ViewComposerServiceProvider extends ServiceProvider
|
|||||||
|
|
||||||
// Suggestions
|
// Suggestions
|
||||||
View::composer(
|
View::composer(
|
||||||
'*', 'App\Http\ViewComposers\Suggestions'
|
['partials.admin.header'], 'App\Http\ViewComposers\Suggestions'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add company info to menu
|
// Add company info to menu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user