{ Laravel snippets }


ModestasV @ModestasMV

TIP: You want to export #laravel eloquent query to native mysql? Here's a quick way to do it: https://t.co/ORGfKtEHNY - Gives out everything you need to run it in mysql console * Warning, doesn't go friendly with relationships and so on. Works on single queries

Caleb Porzio

Caleb Porzio @calebporzio

@jmlallier Here's when ->zip()'s useful: Taking vertical slices of horizontally grouped data (think rows and columns in a DB). If each row is a "year", & each column is "sales/mo" (12 columns), you could get "January sales over 3 years like so": $year1->zip($year2, $year3)->first()