Correct way to drop an assignment
ryanthompson - 10 months 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
$model->delete() 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
\Anomaly\Streams\Platform\Assignment\AssignmentRepository as well as the one for streams and fields to get an idea of what I am talking about. Vs for example the
AssignmentModel which is just an Eloquent model.
Hope that makes sense - I could be rambling...