Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Tonni HouCoder

🎯
Focusing
View GitHub Profile
@HouCoder
HouCoder / eloquent-cheatsheet.php
Created Jun 13, 2016 — forked from hassansin/eloquent-cheatsheet.php
Laravel 5 Eloquent CheatSheet #laravel #eloquent
View eloquent-cheatsheet.php
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*/
View cheatsheet-bemit.md

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