revolution/laravel-carsensor-api

This package is abandoned and no longer maintained. No replacement package was suggested.

CarSensor API for Laravel

1.1.0 2020-03-04 13:41 UTC

This package is auto-updated.

Last update: 2020-10-27 07:28:48 UTC


README

https://webservice.recruit.co.jp/carsensor/

Requirements

  • PHP >= 7.2
  • Laravel >= 6.0

Installation

Composer

composer require revolution/laravel-carsensor-api

Add to config/services.php

    'carsensor' => [
        'key' => env('CARSENSOR_API_KEY', ''),
    ],

.env

https://webservice.recruit.co.jp/register/

CARSENSOR_API_KEY=

Usage

<?php
use CarSensor;

/**
* @param array $query = []
*
* @return object|array
*/
$results = CarSensor::usedcar();
dd($results);
# returns object

$usedcars = data_get($results, 'results.usedcar');;
dd($usedcars);

Returns array

CarSensor::setAssoc(true);
$results = CarSensor::usedcar();
dd($results);

Search Query

$query = [
    'keyword' => 'test',
];
$results = CarSensor::usedcar($query);

LICENSE

MIT
Copyright kawax