mirror of
				https://github.com/v2board/v2board.git
				synced 2025-11-04 11:21:46 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			633 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			633 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Listeners;
 | 
						|
 | 
						|
use App\Events\ServerLogSaveEvent;
 | 
						|
use Illuminate\Queue\InteractsWithQueue;
 | 
						|
use Illuminate\Contracts\Queue\ShouldQueue;
 | 
						|
 | 
						|
class ServerLogSaveListener
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * Create the event listener.
 | 
						|
     *
 | 
						|
     * @return void
 | 
						|
     */
 | 
						|
    public function __construct()
 | 
						|
    {
 | 
						|
        //
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * Handle the event.
 | 
						|
     *
 | 
						|
     * @param  ServerLogSaveEvent  $event
 | 
						|
     * @return void
 | 
						|
     */
 | 
						|
    public function handle(ServerLogSaveEvent $event) {
 | 
						|
        $redisKey = 'last_submit_server_log_' . $event->serverLog->user_id;
 | 
						|
        Redis::set($redisKey, time());
 | 
						|
        info($redisKey);
 | 
						|
    }
 | 
						|
}
 |