Correct way to drop an assignment
ryanthompson - 3 weeks ago
I had it backwards - if you pop into the API there you can see it's actually:
public function findByStreamAndField(StreamInterface $stream, FieldInterface $field);
Yes the same example twice to demonstrate a point that it's not something special I guess. You can delete Eloquent models like
public function findByStreamAndField(StreamInterface $stream, FieldInterface $field); or you can use our repository system. I like to mention to encourage people getting out of the habit of "the Pyro way" when "the Laravel" way is the same or similar and works OK too.
Take a peak at the
$model->delete() as well as the one for streams and fields to get an idea of what I am talking about. Vs for example the
\Anomaly\Streams\Platform\Assignment\AssignmentRepository which is just an Eloquent model.
Hope that makes sense - I could be rambling...