Discount !! E-commerce App With Backend Source Code Video and Voice Chatting App Firebase Chatting App Source Code Complete Gym App BLoC State Management Source Code Complete Study App Buy Ticket Booking App Source Code Buy Travel App With Backend Source Code Complete Chat App Udemy Course Special Offer Discount !! Online Learning Course App (BLoC) Online Learning Course App (Riverpod) Online Learning Course App (Getx) Discount !! Shopping App (Provider) Cool Flutter Game Nodejs Flutter Complete App
Here we will learn how to include a blade file or subview in laravel. It's actually relatively easy. Just use the include directive to include it.
But you must make sure that you have the correct path inside include directive.
For example I created a new view inside resources/views/frontend/ folder. Here the last folder is frontend. So inside include directive you must mention frontend and then you must add a dot and then write the blade file name.
So finally it would look this
Here ads is the blade file name.
Now, that's how you include a view or a sub-view within other views.
Now say, I wanna access this ads view in another folder under resources/views/courses. Inside courses folder I have intro_courses.blade.php file.
So here inside intro_courses.blade.php file I would write like below