app/Console/Commands/CheckTicket.php
/**
     * Execute the console command.
     *
     * @return mixed
     */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function handle()
    {
        ini_set('memory_limit', -1);
        $tickets = Ticket::where('status', 0)
            ->where('updated_at', '<=', time() - 24 * 3600)
            ->get();
        foreach ($tickets as $ticket) {
            if ($ticket->user_id === $ticket->last_reply_user_id) continue;
            $ticket->status = 1;
            $ticket->save();
        }
    }
public function handle ( ) { ini_set ( 'memory_limit' , - 1 ) ; $ tickets = Ticket :: where ( 'status' , 0 ) -> where ( 'updated_at' , '<=' , time ( ) - 24 * 3600 ) -> get ( ) ; foreach ( $ tickets as $ ticket ) { if ( $ ticket -> user_id === $ ticket -> last_reply_user_id ) continue ; $ ticket -> status = 1 ; $ ticket -> save ( ) ; } }
Execute the console command.
Execute the console command .