Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sudheerpal/laravel_eloquent_db_queries

Collection of useful queries (Eloquent and DB )
https://github.com/sudheerpal/laravel_eloquent_db_queries

database eloquent eloquent-models laravel laravel5

Last synced: 1 day ago
JSON representation

Collection of useful queries (Eloquent and DB )

Awesome Lists containing this project

README

        

# Laravel_Eloquent_DB_queries
Collection of useful queries (Eloquent and DB )

### Fetching values from a column

$collection = DB::table('table_name')->where([
['field1', $value1],
['field2', $value2],
])->get();

// first() is used when we need only first match in the collection.

// first() cant be used when there is only one record (unique record)