API Routes
Then we need to generate our controller by running:
php artisan make:controller CreatePostController --plain
And adding the relevant route entry.
<?php
$api->post('posts', 'CreatePostController@create');
Updated less than a minute ago