‘resources\views’ folder is for all templates with the extension .blade.php (e.g. xyz.blade.php) .blade is the template of laravel.
Include external file like header or footer in your template:
1 | @include('layout.header') |
‘layout.header’ : layout is folder name (‘resources/views/layout’) , header is file name (‘resources/views/layout/header.blade.php’)
Path and location of assets file like css, js, images:
All assets files should be under the public folder, so I created a folder under public (public/assets) and kept my files in this folder. (You can create as many folder structures as you want under the public folder).
1 | <link rel="stylesheet" href="{{ URL::asset('assets/css/style.css') }}"> |
1 | <script src="{{ URL::asset('assets/js/custom.js') }}"></script> |
1 | <img src="{{ URL::asset('assets/images/logo-w.png') }}" class="img-fluid" alt=""> |