Create a New Project
- Use terminal and go to particular directory C:/xampp/htdocs
- Apply command composer create-project --prefer-dist laravel/laravel cart
- A new folder cart and necessary files will generate inside the folder
Running the Laravel Project
- Use command php artisan serv
- Open the browser to view the result on http://localhost:8000/
Add route (Laravel 7 only)
- Config the file on route/web.php
Route::get('/', function () {
return view('welcome’);
});
Setup database and login function
- Configure database (goto http://localhost/) select phpMyAdmin
- Create new database
- Configure Laravel database (.env) On the new project
- Install UI package (composer require laravel/ui)
- Add auth UI (php artisan ui vue --auth)
- Install npm package (npm install , npm run dev)– require install nodeJS *important if all the version not match web.php has Auth::routes(); will generate
- Modify layout on View->Auth->login.blade.php