July 2018
Intermediate to advanced
420 pages
8h 46m
English
Swagger generates the documentation for our notations that use API, a kind of self-writing of the framework itself, where, through tags, we can define what each element does. Let's start building our API documentation.
The first step is to add some definitions to the Bike model we just created in the previous steps.
<?phpnamespace App;use Illuminate\Database\Eloquent\Model; /** * @SWG\Definition( * definition="Bike", * required={"make", "model", "year", "mods"}, * @SWG\Property( * property="make", * type="string", * description="Company name", * example="Harley Davidson, Honda, Yamaha" * ), * @SWG\Property( * property="model", ...Read now
Unlock full access