Author : sid heart

i want to query whereBetween two dates with time here is code which is working fine whereBetween(‘created_at’, [now()->subDay()->format(‘Y-m-d’) . ‘ ‘ . $tgame->start_time->format(‘H:i:s’), now()->format(‘Y-m-d’) . ‘ ‘ . $tgame->end_time->format(‘H:i:s’)] but this code is not working $date = Carbon::parse($request->date); whereBetween(‘created_at’, [$date->subDay()->format(‘Y-m-d’) . ‘ ‘ . $tgame->start_time->format(‘H:i:s’), $date->format(‘Y-m-d’) . ‘ ‘ . $tgame->end_time->format(‘H:i:s’)] please also explain thank ..

Read more

Clone and chain issue in laravel query builder and queues Please consider my class constructor : public function __construct(User $query = null) { $this->query = $query ?: (new User())->getQuery(); } I have a method like this : public function getNullActivityUsers() { $query = clone $this->query; $query->whereNull(‘activity’); return $query->get(); } When I call this method, the ..

Read more