fedex First you create an extension and within the extension directory (same as the Extension.php class) run the following command.
php artisan create:apiresource Acme.Extension Orders
Then use this to register the API route.
public function registerApiResources()
{
return [
'orders' => [
'name' => 'Orders',
'description' => 'Orders list',
'controller' => \Acme\Extension\Resources\Orders::class,
'transformer' => \Acme\Extension\Resources\Transformers\OrderTransformer::class,
],
];
}
Change Acme.Extension to your extension name