For virtualization the laravel/homestead
is use.
The intallation instruction can be found at: http://laravel.com/docs/homestead.
- Clone this repository locally:
git clone [email protected]:DevanaLabs/studentinfo-api.git
- Add the folder containing the cloned repository to your 'Homestead.yaml' file.
- Add the site you your 'Homestead.yaml' file:
sites:
- map: api.studentinfo.dev
to: /home/vagrant/Code/student-info-api/public
- Add a new database to your 'Homestead.yaml' file:
databases:
- api_studentinfo
- In your
Homestead
directory run:
vagrant reload --provision
- Change your working directory to your student-info-api folder.
- Copy the file
.env.example
to.env
. - Install the composer packages by running:
composer install
- Migrate the database
php artisan doctrine:migrations:migrate
- To add the project go to
New Project from Existing Files > Source files are in a local directory, no Web server is yet configured
, then select the repository folder as the Project root and Exclude thestorage
directory
- Go to:
Languages & Frameworks > PHP > Servers > New
- Configure new Server:
- Name:
StudentInfo
- Host:
api.studentinfo.dev
- Port: 80
Check
Use path mappings:local-path
-> /home/vagrant/Code/student-info-api
- Name:
- All tables are named in plural.
- Snake casing is used for table naming.
- Pivot tables are named in a way:
first_second
, where first is the name of the first entity and second name of the second entity, sorted in an alphabetical order.