### Install Laravel SDK with Composer Source: https://github.com/rackbeat/laravel-client/blob/master/README.md Use this command to install the Rackbeat Laravel SDK via Composer. ```bash composer require rackbeat/laravel-client ``` -------------------------------- ### Assert API Calls in Laravel SDK Source: https://github.com/rackbeat/laravel-client/blob/master/README.md Demonstrates how to set up API mocking and assert that specific API endpoints have been called or not called. Useful for testing interactions with the API. ```php // Set up the API class to use mocking \Rackbeat\API::mock(); // Has not been called yet \Rackbeat\API::assertNotCalled( 'get', '/lots' ); // Make a API call to GET /lots \Rackbeat\API::lots()->index(); // Has now been called \Rackbeat\API::assertCalled( 'get', '/lots' ); ``` -------------------------------- ### Mock API Response in Laravel SDK Source: https://github.com/rackbeat/laravel-client/blob/master/README.md Shows how to mock a specific API response for a given HTTP method and endpoint. This is useful for simulating API behavior during testing. ```php // Set up the API class to use mocking \Rackbeat\API::mock(); \Rackbeat\API::mockResponse('GET', '/lots', 'no lots'); // Make a API call to GET /lots \Rackbeat\API::lots()->index(); // Assert that the response was 'no lots' \Rackbeat\API::assertResponded( 'get', '/lots', 'no lots' ); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.