Skip to content

Instantly share code, notes, and snippets.

View HouCoder's full-sized avatar
🎯
Focusing

Tonni HouCoder

🎯
Focusing
View GitHub Profile
@HouCoder
HouCoder / eloquent-cheatsheet.php
Created June 13, 2016 10: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*/

BEMIT cheatsheet

source: http://csswizardry.com/2015/03/more-transparent-ui-code-with-namespaces/

  • o-: [Object][object]
    • Objects are abstract.
    • They can be used in any number of places (places you might not have seen).
    • Avoid modifying their styles.
    • Be careful around anything with a leading o-.
  • Examples: layout, wrappers, containers and other structural components