public static function create() { return self::factory('/', HttpMethods::POST, 'create')->name(self::CREATE)->description('Creates a new item using the posted data'); }
public function initialize() { $this->name('Photo')->model(Photo::class)->expectsJsonData()->transformer(PhotoTransformer::class)->itemKey('photo')->collectionKey('photos')->deny(AclRoles::UNAUTHORIZED)->handler(CrudResourceController::class)->endpoint(ApiEndpoint::all())->endpoint(ApiEndpoint::create())->endpoint(ApiEndpoint::find())->endpoint(ApiEndpoint::update())->endpoint(ApiEndpoint::remove()); }