DB::table('tableName')
->where(function ($query) {
$query->where('x', '=', 1)
->orWhere('y', '=', '1');
})
->where('starting_at', '<', '2018-05-01')
->get();
More Related Contents:
- Laravel 5 – How to access image uploaded in storage within View?
- Access Controller method from another controller in Laravel 5
- How can I convert many statement mysql to laravel eloquent?
- Laravel: How to Get Current Route Name? (v5 … v7)
- What is the difference between find(), findOrFail(), first(), firstOrFail(), get(), list(), toArray()
- Can’t install laravel installer via composer
- Laravel: validate an integer field that needs to be greater than another
- Laravel Request::all() Should Not Be Called Statically
- Laravel Checking If a Record Exists
- How to execute Stored Procedure from Laravel
- Laravel catch TokenMismatchException
- Why do I have to run “composer dump-autoload” command to make migrations work in laravel?
- How to redirect back to form with input – Laravel 5
- How to select all column name from a table in laravel?
- Laravel 5 hasMany relationship on two columns
- Laravel 5.2 Auth not Working
- Call to undefined method Maatwebsite\Excel\Excel::load()
- Laravel 5 – Clear Cache in Shared Hosting Server
- Laravel 5.4 on PHP 7.0: PDO Exception – Could not find driver (MySQL)
- Laravel 5 change public_path()
- ErrorBag is always empty in Laravel 5.2
- Laravel 5.2 not reading env file
- Fatal error: Class ‘Illuminate\Foundation\Application’ not found
- disable csrf in laravel for specific route
- How to set the default value of an attribute on a Laravel model [duplicate]
- Difference between Eloquent\Model::get() and all()
- SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
- Custom validator in Laravel 5
- Laravel 5 Clear Views Cache
- Optional parameter in the middle of a route