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.example
to.env
and 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
apiUrl
in 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/angular
directory and copy the contents ofindex.html
into theresources/views/angular.blade.php
file.
If you get error
cp
command not found then, just runnpm run build
and manually copy content of filepublic/assets/angular/index.html
intoresources/views/angular.blade.php
- Browse url:
http://localhost:8000