Suggestions enhancement

This commit is contained in:
cuneytsenturk 2018-06-25 17:59:27 +03:00
parent ebda456f21
commit d23b3b333a
3 changed files with 5 additions and 7 deletions

View File

@ -5,11 +5,11 @@ namespace App\Http\ViewComposers;
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.
@ -60,9 +60,7 @@ class Header
$updates = count(Updater::all());
if (!env('APP_INSTALLED', false)) {
$this->loadSuggestions();
}
$this->loadSuggestions();
$view->with([
'user' => $user,

View File

@ -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;
}

View File

@ -21,7 +21,7 @@ class ViewComposerServiceProvider extends ServiceProvider
// Suggestions
View::composer(
'*', 'App\Http\ViewComposers\Suggestions'
['partials.admin.header'], 'App\Http\ViewComposers\Suggestions'
);
// Add company info to menu