@@ -163,6 +163,10 @@ CREATE TABLE `employees` (
163163 KEY ` zip_postal_code` (` zip_postal_code` ),
164164 KEY ` state_province` (` state_province` )
165165) ENGINE= InnoDB AUTO_INCREMENT= 10 DEFAULT CHARSET= utf8;
166+ INSERT INTO ` employees` (` id` , ` company` , ` last_name` , ` first_name` , ` email_address` , ` job_title` , ` business_phone` , ` home_phone` , ` mobile_phone` , ` fax_number` , ` address` , ` city` , ` state_province` , ` zip_postal_code` , ` country_region` , ` web_page` , ` notes` , ` attachments` )
167+ VALUES
168+ (10 , ' Acme Industries' , ' Smith' , ' Mike' , ' mike.smith@mail.com' , ' Horticultarlist' , ' 0118 9843212' , NULL , NULL , NULL , ' 343 Friary Road' , ' Manchester' , ' Lancs.' , ' M3 3DL' , ' United Kingdom' , NULL , NULL , NULL );
169+
166170```
167171
168172** Orders (Eloquent Model)**
@@ -222,6 +226,10 @@ CREATE TABLE `orders` (
222226 KEY ` fk_orders_orders_status1` (` status_id` ),
223227 CONSTRAINT ` fk_orders_employees1` FOREIGN KEY (` employee_id` ) REFERENCES ` employees` (` id` ) ON DELETE NO ACTION ON UPDATE NO ACTION
224228) ENGINE= InnoDB AUTO_INCREMENT= 82 DEFAULT CHARSET= utf8;
229+ INSERT INTO ` orders` (` id` , ` employee_id` , ` customer_id` , ` order_date` , ` shipped_date` , ` shipper_id` , ` ship_name` , ` ship_address` , ` ship_city` , ` ship_state_province` , ` ship_zip_postal_code` , ` ship_country_region` , ` shipping_fee` , ` taxes` , ` payment_type` , ` paid_date` , ` notes` , ` tax_rate` , ` tax_status_id` , ` status_id` )
230+ VALUES
231+ (82 , 10 , NULL , ' 2015-03-12 00:00:00' , ' 2015-03-12 00:00:00' , NULL , NULL , ' 43, Borrowed Drive' , ' New Oreleans' , ' Louisiana' , ' 4322' , ' USA' , 1 .4000 , 0 .0000 , NULL , NULL , NULL , 0 , NULL , 0 );
232+
225233```
226234
227235Follow up, we'll be creating Transformers. One Transformer is required for each class and it must implement the ` \NilPortugues\Api\Mappings\JsonApiMapping ` interface.
@@ -331,7 +339,7 @@ Same goes for `Orders`, these files will also be placed at `app/Model/Api`:
331339``` php
332340<?php namespace App\Model\Api;
333341
334- use App\Orders;
342+ use App\Model\Database\ Orders;
335343use NilPortugues\Api\Mappings\JsonApiMapping;
336344
337345class OrdersTransformer implements JsonApiMapping
0 commit comments