commit
1e87247f2a
@ -5,7 +5,7 @@ namespace App\Http\ViewComposers;
|
||||
use Illuminate\View\View;
|
||||
use App\Traits\Modules;
|
||||
use Route;
|
||||
use Module;
|
||||
use App\Models\Module\Module;
|
||||
|
||||
class Suggestions
|
||||
{
|
||||
@ -30,7 +30,9 @@ class Suggestions
|
||||
$suggestion_modules = $suggestions->modules;
|
||||
|
||||
foreach ($suggestion_modules as $key => $module) {
|
||||
if (Module::findByAlias($module->alias)) {
|
||||
$installed = Module::where('company_id', '=', session('company_id'))->where('alias', '=', $module->alias)->first();
|
||||
|
||||
if ($installed) {
|
||||
unset($suggestion_modules[$key]);
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,11 @@
|
||||
<h1>
|
||||
@yield('title')
|
||||
@yield('new_button')
|
||||
@if ($suggestion_modules)
|
||||
@foreach($suggestion_modules as $suggestion_module)
|
||||
<span class="new-button"><a href="{{ url($suggestion_module->action_url) }}" target="_blank" class="btn btn-default btn-sm"><span class="fa fa-rocket"></span> {{ $suggestion_module->name }}</a></span>
|
||||
@endforeach
|
||||
@endif
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user