Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getAccount($username)
- {
- /** @var Inspector $inspector */
- $account = Inspector::where('email',$username)->get();
- if (empty($account)) {
- return $this->sendError('Inspector not found');
- }
- SystemLogs::create([
- 'status_log' => 'Signed In',
- 'loggable_id' => $account->first()->id,
- 'loggable_type' => 'Inspector'
- ]);
- return $this->sendResponse($account->toArray(), 'Inspector retrieved successfully');
- }
- Route::resource('inspectors', 'InspectorAPIController');
- Route::get('inspector/{id}/assigned', 'InspectorAPIController@getAccountAssignment');
- Route::get('inspector/{username}', 'InspectorAPIController@getAccount');
- Route::resource('forInspections', 'ForInspectionAPIController');
- client_id: 2
- grant_type: password
- client_secret: 8vdrYwWM1rtqQvduFjBE51MbMJAXjILyM2Yo8u6x
- username: email@yahoo.com
- password: password
Add Comment
Please, Sign In to add comment