mirror of
https://github.com/flarum/core.git
synced 2025-10-12 23:44:27 +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:
@@ -14,6 +14,7 @@ namespace Flarum\Http;
|
||||
use Carbon\Carbon;
|
||||
use Flarum\Database\AbstractModel;
|
||||
use Flarum\User\User;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @property string $token
|
||||
@@ -47,7 +48,7 @@ class AccessToken extends AbstractModel
|
||||
{
|
||||
$token = new static;
|
||||
|
||||
$token->token = str_random(40);
|
||||
$token->token = Str::random(40);
|
||||
$token->user_id = $userId;
|
||||
$token->created_at = Carbon::now();
|
||||
$token->last_activity_at = Carbon::now();
|
||||
|
Reference in New Issue
Block a user