Cemal adalah aplikasi untuk memudahkan seorang muslim mencatat amalan hariannya.
- PHP >= 7.0
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- PostgreSQL 9.5.7
- Install virtualbox 5.2
- Install vagrant 2.0
- Clone cemal-api project
cd ~/code
git clone [email protected]:rifaniponk/cemal-api.git
- Setup Homestead
cd ~
git clone https://github.com/laravel/homestead.git Homestead
cd Homestead
init.bat
Edit Homestead.yml
...
provider: virtualbox
...
folders:
- map: ~/code
to: /home/vagrant/code
*) you can change ~/code
into your root project folder
Run homestead
cd ~/Homestead
vagrant up
Edit hosts file:
linux: /etc/hosts
,
windows: C:\Windows\System32\driver\etc\hosts
.
Add this line into your hosts file
192.168.10.10 cemal.api
- Install Dependencies
Enter to vagrant box then run:
cd ~/vagrant/code/cemal-api
composer install
- Setup Application & Database
cp .env.example .env
php artisan migrate:refresh --seed
- try to open http://cemal.api/v1/whoami, if you see "status 401, Unathorized" then you're ready to rock!
Enter to vagrant box, then run
cd ~/vagrant/code/cemal-api
phpunit
api documentation is here http://cemal.api/api/documentation
if you had a new endpoint or changes, you need to run this to generate updated api documentation
php artisan swagger-lume:generate