Search code examples
phplaravellaravel-nova

Get data from Laravel Nova API


I need to know if there is a way to use Laravel Nova's APIs. I could find some at / /nova-api//

But there is nothing in docs about that. It would be a great help if I could call them outside of Nova, for my mobile app for example.

Thanks!


Solution

  • I am using Laravel Testing for testing nova-apis.

     $response = $this
                ->actingAs($user)
                ->getJson('/nova-api/user/');
    

    Above code will return JSON data for Users for Nova User resource.