PHP Version: >=7.2
Laravel: ~5.8
Angular: >12.0
Simple demo application with some basic authentication functionalities.. registration, login, profile etc.
- Clone repository or download zip on web server document root
git clone [email protected]:patelparixit07/lng-auth.git
- Install the required packages for Laravel.
composer install - Rename
.env.exampleto.envand configure db and url - Run Migration
php artisan migrate - Enter inside the Anuglar folder and Install the required packages for Angular.
cd resources/frontend/angular
npm install
- Start web server
php artisan serve - Browse url:
http://localhost:8000
- To make changes in angular code, jump to folder
resources/frontend/angular - Configure API Endpoint. by updating enviornment variable
apiUrlin fileenviornments/enviornment.ts&enviornments/enviornment.prod.ts
Default: http://localhost:8000
- Serve angular app
npm start - Serve laravel app
php artisan serve - Browse url:
http://localhost:4200/assets/angular - If everything works fine in dev configuration generate production build using below command:
cd resources/frontend/angular
npm run build:prod
That command will build the files, place them in the
public/assets/angulardirectory and copy the contents ofindex.htmlinto theresources/views/angular.blade.phpfile.
If you get error
cpcommand not found then, just runnpm run buildand manually copy content of filepublic/assets/angular/index.htmlintoresources/views/angular.blade.php
- Browse url:
http://localhost:8000