mfr OData API
https://wiki.bluesafety.com/books/mfr-field-service https://documenter.getpostman.com/view/6580879/SWLfaSj7/
3.1. Examples
3.1.1. Client
used for interactive with MFR-API
use App\Http\Controllers\OData\ClientController as Client;
$client = new Client();
$mfr = $client->mfr;
$mfrData = $mfr->from('Companies')->skip(10)->order('ExternalId')->expand('Contacts,Tags,ServiceObjects,MainContact')->get()
$mfrData->each(function($company) {
echo $company->Id;
});
3.1.2. Model
used for interactive with BSH-Database
use App\Models\Mfr\Companies;
Companies::create([]);
3.1.3. Resources
used for interactive with BSH-API
use App\Http\Resources\Mfr\CompanyResource;
return CompanyResource::collection(Companies::all());
return new CompanyResource($company);