AtuThin - အတူသင်

ပထမဆုံး Inertia Page — Controller မှ Props ပို့ခြင်း

Setup ပြီးသွားရင် ပထမဆုံး လက်တွေ့ အလုပ်က controller ကနေ props ပို့ပြီး React page မှာ ပြသတာ ဖြစ်ပါတယ်။ LearnHub အတွက် HomeController မှာ Inertia::render("Home", ["featuredCourses" => $courses, "totalCourses" => $total]) ပုံစံနဲ့ ရေးပြီး resources/js/Pages/Home.jsx မှာ အဲဒီ props တွေကို လက်ခံ ပြပါမယ်။

သင်ခန်းစာ ရယူနေပါတယ်