Support the ongoing development of Laravel.io →
Requests Database
Last updated 2 years ago.
0

Nope as per my knowledge repositories may be used like service layer where you can write your business logic and give a call to your model for database operation or simply return response. If you are giving call to your repository from your controller then you have to write this code in your repository, Hope this will help you.

Last updated 2 years ago.
0

yes all business logic into repositories, not the controller.

how about this also:

if( $group->contains($user) )
{
    // ...
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

szykra szykra Joined 17 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.