API RestFull para CRUD de Pedidos Versão do Laravel usada 5.5 (para manter compatibilidade com servidor HostGator).
- PHP >= 7.0.0
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- 'package.json.example' para 'package.json'
- 'composer.json.example' para 'composer.json'
- composer install
- php artisan vendor:publish
- composer dump-autoload
- php artisan cache:clear
- php artisan route:clear
- php artisan config:clear
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=api_pedidos
DB_USERNAME=your_user
DB_PASSWORD=your_password
- php artisan migrate
- php artisan db:seed --class=ClientesTableSeeder
- php artisan db:seed --class=PastelsTableSeeder
- php artisan db:seed --class=PedidosTableSeeder
- php artisan serve
`
| POST | api/v1/clientes | clientes.store | App\Http\Controllers\ClienteController@store
| GET|HEAD | api/v1/clientes | clientes.index | App\Http\Controllers\ClienteController@index
| GET|HEAD | api/v1/clientes/create | clientes.create | App\Http\Controllers\ClienteController@create
| GET|HEAD | api/v1/clientes/{cliente} | clientes.show | App\Http\Controllers\ClienteController@show
| PUT|PATCH | api/v1/clientes/{cliente} | clientes.update | App\Http\Controllers\ClienteController@update
| DELETE | api/v1/clientes/{cliente} | clientes.destroy | App\Http\Controllers\ClienteController@destroy
| GET|HEAD | api/v1/clientes/{cliente}/edit | clientes.edit | App\Http\Controllers\ClienteController@edit
| GET|HEAD | api/v1/pasteis | pasteis.index | App\Http\Controllers\PastelController@index
| POST | api/v1/pasteis | pasteis.store | App\Http\Controllers\PastelController@store
| GET|HEAD | api/v1/pasteis/create | pasteis.create | App\Http\Controllers\PastelController@create
| DELETE | api/v1/pasteis/{pastei} | pasteis.destroy | App\Http\Controllers\PastelController@destroy
| GET|HEAD | api/v1/pasteis/{pastei} | pasteis.show | App\Http\Controllers\PastelController@show
| PUT|PATCH | api/v1/pasteis/{pastei} | pasteis.update | App\Http\Controllers\PastelController@update
| GET|HEAD | api/v1/pasteis/{pastei}/edit | pasteis.edit | App\Http\Controllers\PastelController@edit
| GET|HEAD | api/v1/pedidos | pedidos.index | App\Http\Controllers\PedidoController@index
| POST | api/v1/pedidos | pedidos.store | App\Http\Controllers\PedidoController@store
| GET|HEAD | api/v1/pedidos/create | pedidos.create | App\Http\Controllers\PedidoController@create
| GET|HEAD | api/v1/pedidos/{pedido} | pedidos.show | App\Http\Controllers\PedidoController@show
| PUT|PATCH | api/v1/pedidos/{pedido} | pedidos.update | App\Http\Controllers\PedidoController@update
| DELETE | api/v1/pedidos/{pedido} | pedidos.destroy | App\Http\Controllers\PedidoController@destroy
| GET|HEAD | api/v1/pedidos/{pedido}/edit | pedidos.edit | App\Http\Controllers\PedidoController@edit |`
- https://laravel.com/docs/5.5/installation
- https://laravel.com/docs/5.5/eloquent
- https://laravel.com/docs/5.5/migrations
- https://laravel.com/docs/5.5/eloquent-relationships#one-to-many
- https://laravel.com/docs/5.5/eloquent#soft-deleting
- https://laravel.com/docs/5.5/seeding
- https://github.com/fruitcake/laravel-cors