gonziis - 6 months ago

Wanted to get clear how to add a new module entry in its modules controller. In pure Laravel it would be creating a module instance and saving it. But whats the best way here?

Really looking forward for anyone helping with this. Thanks.

ryanthompson - 6 months ago

Assuming you mean model and not module - you can do that just fine. Pyro is Laravel. Another way to do it would be with the model's repository instance (which is usually bound by it's interface):

$model = $repository->create($attributes);

ryanthompson - 6 months ago

One of the biggest reasons we use repositories is for separation of concern as we're a domain driven app. But there's no hiding that the stream entry models are souped up Laravel models use them as you wish! I know I do ^_^