Hi @ramniksingh
What's the column data type of appdate column in the database? Is it a datetime, a date, a timestamp or is is stored as something unconventional like varchar?
I just tried the statement with a timestamp column and it works just fine:
// Create our model database schema
Schema::create('flights', function ($table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('number');
$table->boolean('active')->default(true);
$table->timestamps();
});
class Flight extends Illuminate\Database\Eloquent\Model {
}
Flight::forceCreate([
'name' => 'Inactive Flight',
'number' => 'AB6650',
'active' => false,
]);
Flight::forceCreate([
'name' => 'Active Flight',
'number' => 'AB6650',
'active' => true,
]);
// Retrieve models
$flights = DB::table('flights')->whereDate('created_at', '>=', '2020-06-28')->get();