I'm an enthusiastic software engineer always eager to learn.
Currently working with Lappasoft.
Here is my stackoverflow profile: https://stackoverflow.com/users/5911206/silidrone
Thank you for the article, I really like the tips mentioned, especially the query scopes, which are a nice way to reduce repetition in Repositories for your app.
My eye just caught something while reading the article, shouldn't the filter method be used as (for filtering unpaid invoices in your example): $activeInvoices = $invoices->filter(function ($invoice) {
return !$invoice->paid;
});
With the !
It seems weird that the condition in the closure for the reject and the filter function are the same.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you for the article, I really like the tips mentioned, especially the query scopes, which are a nice way to reduce repetition in Repositories for your app.
My eye just caught something while reading the article, shouldn't the filter method be used as (for filtering unpaid invoices in your example):
$activeInvoices = $invoices->filter(function ($invoice) {
return !$invoice->paid;
});
With the
!
It seems weird that the condition in the closure for the
reject
and thefilter
function are the same.