public static function update() { return self::factory('/{id}', HttpMethods::PUT, 'update')->name(self::UPDATE)->description('Updates an existing item identified by {id}, 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()); }