##Structure and interaction
The constructor consists of three parts:
- frontend (on the Angular framework)
- backend (on the Laravel framework)
- mobile (Ionic framework)
The interaction between them occurs through GET/POST requests. Since we write the frontend separately, we will not have to use View in laravel itself.
The production-generated frontend will be located at the root of the domain. So, public from laravel will also be configured on the root of the folder. Thus, both projects will be combined in the same directory, and therefore no additional Apache configuration will be needed.
-
A database is needed for the backend to function.
-
For the backend to function, a PHP version of at least 8.0 is required
-
For the frontend to function, npm must be installed.
-
Composer must be installed for PHP.
First of all, you need to set up a working WEB server and MySQL server. You can use OpenServer, LAMP, XAMP, and/or other assemblies. In the future, we will assume that the DOCUMENT_ROUT of the server is the 'start' folder, and mysql is already started.
- Clone git to local machine
git clone https://github.com/nwicode/start_2.git start
- Open 'start' folder and instal php libreries
php composer install
- Prepare mysql (create database and add credentials to .env file)
- Migrate data to MySQL
php artisan migrate --seed
For frontend developing you must build Angular project of platform admin part. For that, follow nest steps:
- go to admin folder
cd admin
- Install NPM dependencies
npm install
- Buld sources to 'public' folder
ng build --output-path=../public --delete-output-path=false
- If you need to apply changes in runtime - build sources with --watch options
ng build --output-path=../public --delete-output-path=false
- MB you need to create new App key -
php artisan key:generate
Open in browser http://localhost
or the URL you configured your server to.