diff --git a/app/app/View/Components/Child.php b/app/app/View/Components/Child.php new file mode 100644 index 0000000..cbbaf94 --- /dev/null +++ b/app/app/View/Components/Child.php @@ -0,0 +1,26 @@ + + const childVar = ref('Hello from child component'); + + +

Child component

+
+

Slot

+ {{ $slot }} +
\ No newline at end of file diff --git a/app/resources/views/components/root.blade.php b/app/resources/views/components/root.blade.php new file mode 100644 index 0000000..d98c36d --- /dev/null +++ b/app/resources/views/components/root.blade.php @@ -0,0 +1,20 @@ + + +

Parent component

+

Count: @{{ count }}

+ + + + + Child Slot +

Count: @{{ count }}

+
\ No newline at end of file diff --git a/app/resources/views/slot.blade.php b/app/resources/views/slot.blade.php new file mode 100644 index 0000000..5844d8f --- /dev/null +++ b/app/resources/views/slot.blade.php @@ -0,0 +1,9 @@ + + + +

Layout counter: @{{ layoutCounter }}

+ + +
\ No newline at end of file diff --git a/app/routes/web.php b/app/routes/web.php index 7c550d6..cb2d641 100644 --- a/app/routes/web.php +++ b/app/routes/web.php @@ -35,6 +35,7 @@ Route::view('/refresh', 'refresh')->middleware(Refreshable::class); Route::view('/refresh-state', 'refresh-state')->middleware(Refreshable::class); Route::view('/regular-view', 'regular-view'); +Route::view('/slot', 'slot'); Route::view('/to-vue-prop', 'to-vue-prop'); Route::view('/two-way-binding', 'two-way-binding');