Closed JonathanHindi closed 11 years ago
Howdy -
It looks like your class Category
is not be defining the methods as required by the ResourceInterface, which requires the declaration of a getEtag()
method and getLastUpdated()
method in any implementing class.
I've implemented ResourceInterface
for the Eloquent ORM in this library - However, since you are using Ardent, you will need to create your own implementation of getEtag()
and getLastUpdated()
that work with the Ardent.
Note: - I plan on rewriting this library almost completely, as the methods wasModified
and wasNotModified
don't really solve the problem domain in as elegant a fashion as it could (In other words, this code still needs work :D ).
I may also move the generation of ETags to a separate "service" classes, which would remove the need for an interface and an implementation (which in the case of my code means eliminating the need for extending Eloquent).
That being said, this libraries current incarnation is perfectly acceptable for Conditional GET's (wasModified
) and Concurrency Control (wasNotModified()
). There's just some more leg-work on your end to make your Ardent model implement the ResourceInterface
class.
Hope that makes senes!
Since you are planning to rewrite it, I will hold on using the package for now and implemented later when you update the package. Thanks Anyway :),
Hello I have a new library which does the client-side of things. That is up here: https://github.com/fideloper/ConditionalRequest with some Laravel-based explanation here: https://github.com/fideloper/ConditionalRequest/wiki/Laravel-Symfony
Note: This doesn't generate ETags for you - this is purely the request side, and doesn't attempt to use Eloquent (etc) - That'll be a separate package.
I am trying to set the package on a Laravel 4 installation, The docs aren't clear about what to do for laravel and what to do for other implementations.
Model:
Controller Action:
When running the action I got this error:
I think I am missing something in the implementation.