Files
investbrain/app/View/Components/AppLayout.php
T

54 lines
1.7 KiB
PHP
Raw Normal View History

2024-08-01 13:53:10 -05:00
<?php
2025-01-28 17:33:54 -06:00
declare(strict_types=1);
2024-08-01 13:53:10 -05:00
namespace App\View\Components;
use Illuminate\View\Component;
class AppLayout extends Component
{
/**
* Get the view / contents that represents the component.
*/
2024-08-05 22:41:53 -05:00
public function render()
2024-08-01 13:53:10 -05:00
{
2024-08-05 22:41:53 -05:00
return <<<'HTML'
<x-main-layout>
<x-slot:body class="min-h-screen font-sans antialiased bg-base-200/50 dark:bg-base-200" x-data>
<div>
2024-08-05 22:41:53 -05:00
<x-partials.nav-bar />
<x-main with-nav full-width>
<x-slot:sidebar drawer="main-drawer" class="bg-base-100 lg:bg-inherit">
<x-partials.side-bar />
</x-slot:sidebar>
<x-slot:content>
2024-08-05 22:41:53 -05:00
{{ $slot }}
</x-slot:content>
</x-main>
@if(session('toast'))
<script lang="text/javascript">
window.addEventListener('DOMContentLoaded', function () {
window.toast(JSON.parse(@json(session('toast'))))
});
</script>
@endif
2024-08-05 22:41:53 -05:00
<x-toast />
</div>
</x-slot:body>
</x-main-layout>
HTML;
2024-08-01 13:53:10 -05:00
}
}