1
0
mirror of https://github.com/flarum/core.git synced 2025-10-13 07:54:25 +02:00

Deprecate AssertPermissionTrait (#2044)

This commit is contained in:
Alexander Skvortsov
2020-07-17 09:16:15 -04:00
committed by GitHub
parent 2b3dec2be1
commit eaac78650f
36 changed files with 103 additions and 135 deletions

View File

@@ -11,12 +11,9 @@ namespace Flarum\Notification\Command;
use Carbon\Carbon;
use Flarum\Notification\Notification;
use Flarum\User\AssertPermissionTrait;
class ReadNotificationHandler
{
use AssertPermissionTrait;
/**
* @param ReadNotification $command
* @return \Flarum\Notification\Notification
@@ -26,7 +23,7 @@ class ReadNotificationHandler
{
$actor = $command->actor;
$this->assertRegistered($actor);
$actor->assertRegistered();
$notification = Notification::where('user_id', $actor->id)->findOrFail($command->notificationId);