Commands for laravel components

To create Header Component: After running this a components folder and file will be created /app/view/components/header.php

Another components folder and file will be created /resources/views/components/header.blade.php

php artisan make:component header

Now write header info in header.blade.php and then write the below code in any *.blade.php file to include header!

<x-header />

In the same way, you can create a footer component also.

To restore missing system file

composer dump-autoload

Leave a Reply

Your email address will not be published. Required fields are marked *