I want get data with specific date (timestamp) in database, i use this method and everything fine ! Method:
public function getdatabyday() {
$p = "zero";
$day = date('Y-m-d ', strtotime($_GET['day']));
$users = DB::select('select * from S where (`timestamp` like "'.$day.'%")' );
if (!$users)
{ return $p; }
return $users;
}
I want add parameter "day" in this swagger (function) where i put date exemple (07-08-2020) in this parameter in swagger documentation and as well i get data from specific timestamp or day :
/**
* @OA\Get(
*
* path="/api/getdatabyday",
* summary="Get data",
* @OA\Response(
* response=200,
* description="successful operation",
* ),
* security={
* {"bearerAuth": {}}
* }
* )
*/
And in Route :
Route::get('/getdatabyday','Api\AuthController@getdatabyday')->middleware('auth:api');
Any help with adding parameter day ?