Table of Contents
This is the 2nd part of our Laravel blog,news website tutorials from scracth . If you haven't seen our first part visit Creating Laravel Blog,News website from scratch tutorial series | Part 1
If you looking for advance ready to use laravel blog, news website script, visit here
We will proceed step by step. So, let's work for admin panel 1) Setup Admin Panel Theme
- Download admin theme ex: https://startbootstrap.com/template-overviews/sb-admin
- Create 'admin' folder inside public/
- Copy css,js,images,fonts,vendor file to public/admin/
- create folder 'admin' inside resources/views/
- Create folder 'layout' inside resources/views/admin/
- Copy index.html of downlaod admin theme to resources/views/admin/layout
- Rename this index.html to master.blade.php
- Open master.blade.php and
- set css,js path ex: {{asset('public/admin/css/bootstrap.min.css')}}
- remove code between class="container-fluid" then put below
- also replace
- Create a file 'home.blade.php' inside resources/views/admin
- Put below inside home.blade.php
Create Routes
put below route inside app/routes.php
Create Controller
- Create a folder 'Admin' inside app\Http\Controllers - Create controller 'AdminController.php' inside this 'Admin' folder command : php artisan make:controller Admin\AdminController So it looks app\Http\Controllers\Admin\AdminController.php Replace with below
Now type below on url to test admin theme
ex:
Do remove extra code from master.blade.php
ex:
- menu
- top bar (message ,notification,search )
After cleanup , our admin's master.blade.php looks < Core plugin JavaScript> < Page level plugin JavaScript> < Custom scripts for all pages> < Demo scripts for this page> @yield('footer_scripts')