Sadržaj
where has, where has
https://stackoverflow.com/questions/30231862/laravel-eloquent-has-with-wherehas-what-do-they-mean
strict greška, group and order by https://stackoverflow.com/questions/40917189/laravel-syntax-error-or-access-violation-1055-error
sum query https://laracasts.com/discuss/channels/laravel/group-by-month-and-company-sum-count
https://github.com/laravel/framework/issues/14997#issuecomment-242129087
group by month and company sum and count https://laracasts.com/discuss/channels/laravel/group-by-month-and-company-sum-count
monthly sum https://stackoverflow.com/questions/35881846/get-monthly-sum-in-laravel
sum method issue https://stackoverflow.com/questions/30424949/laravel-query-builder-sum-method-issue
year/month summary $openInvoices = Invoice::selectRaw('invoices.*, sum(payments.amount) as sum') ->join('payments', 'invoices.id', '=', 'payments.invoice_id') ->whereRaw('invoices.amount < sum') ->groupBy('invoices.id') ->get();
Carbon dates
/* $today= Carbon::now();
echo 'god-'.$today->year.'
';
echo 'mj-'.$today->month.'
';
echo 'dan-'.$today->day.'
';
echo 'sat-'.$today->hour.'
';
echo 'min-'.$today->minute.'
';
echo 'sec-'.$today->second.'
'; */
week / month from to za query Data::whereBetween('created_at', [Carbon::now()->startOfWeek(), Carbon::now()->endOfWeek()])->get(); Carbon::setWeekStartsAt(Carbon::SUNDAY); Carbon::setWeekEndsAt(Carbon::SATURDAY);
laravel update notification(updated_at)
- UPDATE
notifications
SETread_at
= NULL WHEREnotifications
.id
!= '0';
#central studio :
- update clan set clan_status_id=1 where clan_status_id=0
trim whitespace
45 praznih mjesta i manje, sve ispravljeno
UPDATE clan SET ime_prezime = REPLACE(ime_prezime, ' ', ' ');
#Č i Ć zamjena
UPDATE clan SET ime_prezime = REPLACE(ime_prezime, 'Æ', 'Ć'); UPDATE clan SET ime_prezime = REPLACE(ime_prezime, 'È', 'Č');