Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 )
- Host: GitHub
- URL: https://github.com/sudheerpal/laravel_eloquent_db_queries
- Owner: sudheerpal
- Created: 2017-04-22T08:56:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-22T09:24:55.000Z (almost 8 years ago)
- Last Synced: 2024-11-20T20:44:04.901Z (2 months ago)
- Topics: database, eloquent, eloquent-models, laravel, laravel5
- Language: HTML
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)