July 2018
Intermediate to advanced
420 pages
8h 46m
English
Now, it is time to create some API routes and check what we have built so far. We are using the new feature of apiResource.
Open project/routes/api.php and add the following code:
Route::apiResources([ 'bikes' => 'API\BikeController', 'builders' => 'API\BuilderController', 'items' => 'API\ItemController', 'bikes/{bike}/ratings' => 'API\RatingController']);
At this moment, we already have the necessary code for our API, so we need to make some small adjustments and explain some more things.
Read now
Unlock full access