mirror of
https://github.com/flarum/core.git
synced 2025-07-28 12:10:51 +02:00
Use Laravel's class-based Str and Arr helpers
Starting with version 5.9, the global funtions will be deprecated. * https://laravel-news.com/laravel-5-8-deprecates-string-and-array-helpers * https://github.com/laravel/framework/pull/26898
This commit is contained in:
@@ -17,6 +17,7 @@ use Flarum\Group\Group;
|
||||
use Flarum\Group\GroupValidator;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
class CreateGroupHandler
|
||||
{
|
||||
@@ -51,10 +52,10 @@ class CreateGroupHandler
|
||||
$this->assertCan($actor, 'createGroup');
|
||||
|
||||
$group = Group::build(
|
||||
array_get($data, 'attributes.nameSingular'),
|
||||
array_get($data, 'attributes.namePlural'),
|
||||
array_get($data, 'attributes.color'),
|
||||
array_get($data, 'attributes.icon')
|
||||
Arr::get($data, 'attributes.nameSingular'),
|
||||
Arr::get($data, 'attributes.namePlural'),
|
||||
Arr::get($data, 'attributes.color'),
|
||||
Arr::get($data, 'attributes.icon')
|
||||
);
|
||||
|
||||
$this->events->dispatch(
|
||||
|
Reference in New Issue
Block a user