apps my page fixed empty page message ( #337ymcn )

This commit is contained in:
Cüneyt Şentürk 2022-07-27 11:34:08 +03:00
parent cebef2e563
commit 2e10309210
2 changed files with 21 additions and 3 deletions

View File

@ -3,9 +3,12 @@
namespace App\Http\Controllers\Modules; namespace App\Http\Controllers\Modules;
use App\Abstracts\Http\Controller; use App\Abstracts\Http\Controller;
use App\Traits\Modules;
class My extends Controller class My extends Controller
{ {
use Modules;
/** /**
* Display a listing of the resource. * Display a listing of the resource.
* *
@ -13,6 +16,9 @@ class My extends Controller
*/ */
public function index() public function index()
{ {
return $this->response('modules.my.index'); $purchase = $this->getMyModules(['query' => ['limit' => 16]]);
$installed = $this->getInstalledModules();
return $this->response('modules.my.index', compact('purchase', 'installed'));
} }
} }

View File

@ -14,9 +14,21 @@
</x-slot> </x-slot>
<x-slot name="content"> <x-slot name="content">
<x-modules.purchased /> @if (! empty($purchase) || ! empty($installed))
<x-modules.purchased />
<x-modules.installed /> <x-modules.installed />
@else
<div class="py-6 font-medium">
<div class="flex items-center justify-between mb-5 lg:mb-0">
<h4 class="py-3 font-medium lg:text-2xl">
{{ trans('modules.my_apps') }}
</h4>
</div>
<x-modules.no-apps />
</div>
@endif
</x-slot> </x-slot>
<x-script folder="modules" file="apps" /> <x-script folder="modules" file="apps" />