项目作者: CesarGonzAndres

项目描述 :
Backend Test API RESTFUL made on Lumen Framework
高级语言: PHP
项目地址: git://github.com/CesarGonzAndres/backendTestPanama.git
创建时间: 2017-10-29T16:52:06Z
项目社区:https://github.com/CesarGonzAndres/backendTestPanama

开源协议:

下载


Backend Test

Aperturar puerto 8000

  • php -S localhost:8000 -t public

Crear Base de datos local MySQL

  • En la config la cual deje ‘expuesta’ ya que es un test se llama ‘agency’ si quieres ponerle otro nombre redefinelo en el ‘.env’ file

Actualizar Dependencias

  • composer update

Generar las tablas y campos en la base de datos

  • php artisan migrate

Generar registros con faker

  • php artisan db:seed

Endpoints

  • Viajero / json

‘POST’: ‘viajero’,
‘GET’: ‘viajero’,
‘GET’: ‘viajero/id’,
‘DELETE’: ‘viajero/id’,
‘PUT’: ‘viajero/id’

Dev

Model creation

  • php artisan make:model Name -m

Table creation from model

  • php artisan make:migration create_projects_table —create=projects

Modifying tables

  • php artisan make:migration add_votes_to_users_table —table=users

Seeds creation

  • php artisan make:seeder SEEDERSNAME