You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add a where condition before all finds(find findAll first).
for example, $where = ['company_id' => session->get('company_id')];
default search for company data.
beforeFind event is ok?
The text was updated successfully, but these errors were encountered:
bangbangda
changed the title
Model Events Why is there no beforeFind?
Model events why is there no beforeFind?
Nov 23, 2018
I guess that's a valid use. It seems to me like there would still be situations where you would want that. Personally, I'd just add a new method in the model, findForCompany($id) or something. That's more explicit.
I want to add a where condition before all finds(find findAll first).
for example,
$where = ['company_id' => session->get('company_id')];
default search for company data.
beforeFind event is ok?
The text was updated successfully, but these errors were encountered: