Skip to content

Commit

Permalink
Suggestions enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Jun 25, 2018
1 parent ebda456 commit d23b3b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions app/Http/ViewComposers/Header.php
Expand Up @@ -5,11 +5,11 @@
use Auth;
use App\Utilities\Updater;
use Illuminate\View\View;
use App\Traits\Modules;
use App\Traits\Modules as RemoteModules;

class Header
{
use Modules;
use RemoteModules;

/**
* Bind data to the view.
Expand Down Expand Up @@ -60,9 +60,7 @@ public function compose(View $view)

$updates = count(Updater::all());

if (!env('APP_INSTALLED', false)) {
$this->loadSuggestions();
}
$this->loadSuggestions();

$view->with([
'user' => $user,
Expand Down
2 changes: 1 addition & 1 deletion app/Http/ViewComposers/Suggestions.php
Expand Up @@ -20,7 +20,7 @@ class Suggestions
public function compose(View $view)
{
// No need to add suggestions in console
if (app()->runningInConsole() || !env('APP_INSTALLED', false)) {
if (app()->runningInConsole() || !env('APP_INSTALLED')) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion app/Providers/ViewComposerServiceProvider.php
Expand Up @@ -21,7 +21,7 @@ public function boot()

// Suggestions
View::composer(
'*', 'App\Http\ViewComposers\Suggestions'
['partials.admin.header'], 'App\Http\ViewComposers\Suggestions'
);

// Add company info to menu
Expand Down

0 comments on commit d23b3b3

Please sign in to comment.