Docs
Docs

API Routes

Then we need to generate our controller by running:

php artisan make:controller CreatePostController

And adding the relevant route entry.

<?php


$api->post('posts', 'CreatePostController@create');

Prefer a screencast?