for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the HRis Software package.
*
* NOTICE OF LICENSE
* Licensed under the 3-clause BSD License.
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file.
* @version alpha
* @author Bertrand Kintanar <[email protected]>
* @license BSD License (3-clause)
* @copyright (c) 2014-2016, b8 Studios, Ltd
* @link http://github.com/HB-Co/HRis
*/
namespace HRis\Api\Controllers;
use HRis\Api\ThirdParty\Elastic;
use Illuminate\Http\Request;
use Irradiate\Api\Controllers\BaseController;
use Irradiate\Eloquent\Employee;
use Symfony\Component\HttpFoundation\Response;
class PlaygroundController extends BaseController
{
protected $employee;
protected $elastic;
public function __construct(Employee $employee, Elastic $elastic)
$this->employee = $employee;
$this->elastic = $elastic;
}
public function index(Request $request)
$result = $this->elastic->searchEmployee($request->all());
return $this->responseAPI(Response::HTTP_CREATED, SUCCESS_RETRIEVE_MESSAGE, compact('result'));