Skip to content

Instantly share code, notes, and snippets.

@abbood
Created October 21, 2017 05:39
Show Gist options
  • Save abbood/04840f5c17327e822cd543b0cfc9eda7 to your computer and use it in GitHub Desktop.
Save abbood/04840f5c17327e822cd543b0cfc9eda7 to your computer and use it in GitHub Desktop.
class BuyerController extends ApiController
{
/**
*
* @SWG\Get(
* path="/buyers",
* tags={"buyers"},
* summary="List All Buyers",
* description="",
* operationId="buyers.index",
* produces={"application/json"},
* @SWG\Parameter(
* name="sort_by",
* in="query",
* description="Sort buyers by Identifier, name, isVerified, creationDate, lastChange",
* required=false,
* type="string"
* ),
* @SWG\Parameter(
* name="Identifier",
* in="query",
* description="Filter buyers by id",
* required=false,
* type="integer"
* ),
* @SWG\Parameter(
* name="name",
* in="query",
* description="Filter buyers by name",
* required=false,
* type="string"
* ),
* @SWG\Parameter(
* name="isVerified",
* in="query",
* description="Filter buyers by isVerified",
* required=false,
* type="boolean"
* ),
* @SWG\Parameter(
* name="creationDate",
* in="query",
* description="Filter buyers by creationDate",
* required=false,
* type="string"
* ),
* @SWG\Parameter(
* name="lastChange",
* in="query",
* description="Filter buyers by lastChange",
* required=false,
* type="string"
* ),
* @SWG\Response(
* response=200,
* description="Success Response List Of Buyers",
* @SWG\Schema (
* @SWG\Property(
* property="data",
* ref="#/definitions/Buyer"
* ),
* ),
* )
*
*
* )
*
*
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$buyers = Buyer::all();
return $this->showAll($buyers);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment