2017 © Pedro Peláez
 

package laravel-model-api

image

g3n1us/laravel-model-api

  • Sunday, June 3, 2018
  • by g3n1us
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

laravel-model-api

A controller providing a logical url structure for accessing model data, (*1)

Usage: modelname is the snake cased version of the model. If singular, will display either the first model or the one specified by id. If plural, a paginated list of items will be output. If html is specified, the __toString method will explicitly be called, returning any overloaded version in the model, usually custom html output., (*2)

$_GET parameters for plural form only:, (*3)

paginate - 0 results in no pagination, default = 1, (*4)

per_page = results per page, disables pagination, integer default is pagination default, 15, (*5)

offset = offset, return results starting at this offset, (*6)

limit - limit to return, disables pagination, (*7)

pluck/property - pluck a value from the returned objects, (*8)

$_GET parameters for singular form only:, (*9)

html - returns the model's overloaded __toString method instead of the default JSON representation, also an URL parameter, (*10)

The Versions

03/06 2018

dev-master

9999999-dev

  Sources   Download