Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
inikoo committed Oct 6, 2023
1 parent 66c889a commit 469c001
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
2 changes: 2 additions & 0 deletions app/Http/Middleware/HandlePublicInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public function share(Request $request): array
};



$firstLoadOnlyProps['structure']=$request->get('website')->compiled_layout;

return array_merge(
$firstLoadOnlyProps,
parent::share($request),
Expand Down
23 changes: 7 additions & 16 deletions resources/js/Layouts/Public.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,23 @@

<script setup>

import { usePage } from "@inertiajs/vue3"






const props = defineProps([
'layout',
'structure'
])

console.log(props.structure)

const header = usePage().props.structure.header;
console.log(usePage().props)
</script>

<template>
<div class="relative ">
<section class="relative isolate overflow-hidden bg-gray-100"
:class="[structure.layout.layout !== 'center' ? 'mx-auto max-w-5xl' : '']"
>


<slot />



</section>
</div>

Expand Down

0 comments on commit 469c001

Please sign in to comment.