mirror of
https://github.com/flarum/core.git
synced 2025-08-13 03:44:32 +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:
@@ -16,6 +16,7 @@ use Flarum\Database\AbstractModel;
|
||||
use Flarum\Event\ScopeModelVisibility;
|
||||
use Flarum\User\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
/**
|
||||
* Models a notification record in the database.
|
||||
@@ -104,7 +105,7 @@ class Notification extends AbstractModel
|
||||
*/
|
||||
public function getSubjectModelAttribute()
|
||||
{
|
||||
return $this->type ? array_get(static::$subjectModels, $this->type) : null;
|
||||
return $this->type ? Arr::get(static::$subjectModels, $this->type) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user