1. php artisan make:component Navigation --inline


app/View/Components/Navigation/php 파일만 생성된다.


2. 만들어진 component를 삽입해보자

<body class="flex flex-col items-center">

<x-sidebar title="My Sidebar" :info="$info" class="bg-gray-500">

<x-slot name="sometning">사이드바 제목</x-slot>

<div class="border-solid border-4 border-red-500">추가내용</div>

</x-sidebar>

<x-navigation></x-navigation>

</body>


결과


+ Recent posts