Actually Creating the Layout Believe it or not, the difficult part was covered in the previous article. Breaking apart the header and footer components was a tedious task. Creating a layout is simple. Laravel — P18: Component Layout Prep-Work Recap We first created the following file: views/layouts-test/index.blade.php. <!DOCTYPE html> <html lang=”{{ str_replace(‘_’, ‘-‘, app()->getLocale()) }}”> <head> <meta charset=”utf-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <title>{{ $title }}</title> <!– Fonts –> <link href=”https://fonts.bunny.net/css2?family=Nunito:wght@400;600;700&display=swap” rel=”stylesheet”> <!– Styles –> <style> /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}a{background-color:transparent}[hidden]{display:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{box-sizing:border-box;border:0 solid #e2e8f0}a{color:inherit;text-decoration:inherit}svg,video{display:block;vertical-align:middle}video{max-width:100%;height:auto}.bg-white{–tw-bg-opacity: 1;background-color:rgb(255 255 255 /

Layouts For Our Blade Components In the previous article, we looked at breaking apart our header and storing it into components. This time, we’ll continue on and break apart our footer. We’ll then create a layout and add our body content in the next article Laravel — P17: Components Within Components The Setup In our components directory, we’ll create a new subdirectory called layouts. The layouts directory will contain a header and a footer subdirectory. The header directory will contain all of our code that we focused on in the previous article: logo.blade.php main.blade.php nav.blade.php nav-button.blade.php nav-dropdown.blade.php nav-dropdown-option.blade.php The footer subdirectory will contain our footer components that we’ll work

Component Inception We’re going to see what the true power of components looks like; I should have called this article Component Inception since we’ll be going deep inside our components. In the previous article, we just touched on the topic, but we’re going to expand it fully this time. Laravel — P16: Blade Anonymous Components Introduction Our header component will be composed of smaller components. We can choose how small we want to go. What it looks like right now Our header contains all of the code that composes our top menu navigation. <!DOCTYPE html> <html lang=”{{ str_replace(‘_’, ‘-‘, app()->getLocale())