Skip to content

Instantly share code, notes, and snippets.

View mutwol's full-sized avatar
🏠
Working from home

Mutwol mutwol

🏠
Working from home
  • Nairobi
View GitHub Profile
@mutwol
mutwol / curl.md
Created February 6, 2021 18:24 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@mutwol
mutwol / eloquent-cheatsheet.php
Created May 30, 2017 07:23 — forked from hassansin/eloquent-cheatsheet.php
Laravel 5 Eloquent CheatSheet #laravel #eloquent
Model::
/*Select*/
select('col1','col2')
->select(array('col1','col2'))
->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating'))
->addSelect('col3','col4')
->distinct() // distinct select
/*From*/