add event UserProfileUpdated
This commit is contained in:
parent
eb3b963dca
commit
0d006dac66
|
|
@ -3,7 +3,6 @@
|
|||
namespace App\Events;
|
||||
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
|
||||
class CheckPlayerExists extends Event
|
||||
{
|
||||
|
|
@ -21,13 +20,4 @@ class CheckPlayerExists extends Event
|
|||
$this->player_name = $player_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the channels the event should be broadcast on.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function broadcastOn()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace App\Events;
|
||||
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
|
||||
class GetAvatarPreview extends Event
|
||||
{
|
||||
|
|
@ -24,13 +23,4 @@ class GetAvatarPreview extends Event
|
|||
$this->size = $size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the channels the event should be broadcast on.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function broadcastOn()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ namespace App\Events;
|
|||
|
||||
use App\Models\Player;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
|
||||
class GetPlayerJson extends Event
|
||||
{
|
||||
|
|
@ -25,13 +24,4 @@ class GetPlayerJson extends Event
|
|||
$this->api_type = $api_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the channels the event should be broadcast on.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function broadcastOn()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ namespace App\Events;
|
|||
|
||||
use App\Models\Texture;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
|
||||
class GetSkinPreview extends Event
|
||||
{
|
||||
|
|
@ -25,13 +24,4 @@ class GetSkinPreview extends Event
|
|||
$this->size = $size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the channels the event should be broadcast on.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function broadcastOn()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ namespace App\Events;
|
|||
|
||||
use App\Models\Player;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
|
||||
class PlayerProfileUpdated extends Event
|
||||
{
|
||||
|
|
@ -22,13 +21,4 @@ class PlayerProfileUpdated extends Event
|
|||
$this->player = $player;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the channels the event should be broadcast on.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function broadcastOn()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
26
app/Events/UserProfileUpdated.php
Normal file
26
app/Events/UserProfileUpdated.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class UserProfileUpdated extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $type;
|
||||
public $user;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($type, User $user)
|
||||
{
|
||||
$this->type = $type;
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ class AdminController extends Controller
|
|||
|
||||
$form->group('max_upload_file_size', '最大允许上传大小', function($group) {
|
||||
// main textbox
|
||||
$group->text('max_upload_file_size');
|
||||
$group->text('max_upload_file_size', option('max_upload_file_size'));
|
||||
$group->addon('KB');
|
||||
})->hint('PHP 限制:'.ini_get('post_max_size').',定义在 php.ini 中。');
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ use Utils;
|
|||
use App\Models\User;
|
||||
use App\Models\Texture;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Events\UserProfileUpdated;
|
||||
use App\Exceptions\PrettyPageException;
|
||||
use App\Services\Repositories\UserRepository;
|
||||
|
||||
|
|
@ -124,6 +125,8 @@ class UserController extends Controller
|
|||
break;
|
||||
}
|
||||
|
||||
event(new UserProfileUpdated($this->action, $this->user));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user