Laravel
Our Laravel Wrapper is a simple way to integrate the autoZnetwork API into your Laravel application using the PHP SDK.
Visit https://github.com/autoznetwork/autoznetwork-laravel for more information on how to use this wrapper.
If you want to dive straight in, here's what we suggest;
Read the getting started guide for the SDK. This will get the package installed and configure your API keys.
Start managing your vehicles via the SDK (get data, add a new vehicle, remove a vehicle). Once you've got that going, you're all set.
Getting started
We offer a Laravel wrapper around our PHP SDK that is ready for use. It's open source and we happily accept contributions to it.
First, grab the latest stable version via composer.
composer require autoznetwork/autoznetwork-laravel
Next, create your API key as a single, mandatory, environment variable. If you don't have an API key yet, read up on the API authentication first first. In your .env file add your API key.
AUTOZNETWORK_API_KEY=123456
To begin using the wrapper you now have access to the AutozNetwork class.
use AutozNetwork/AutozNetwork;
class VehicleController extends Controller
{
public function index(AutozNetwork $autoZnetwork) {
$vehicles = $autoZnetwork
->withOrganization($organizationId)
->inventory()
->get();
return $vehicles;
}
}