Replace deprecated array and string helpers
Laravel recommends using the `Str` and `Arr` class methods directly instead of the respective helper functions. These helper functions are deprecated in Laravel 5.8 and removed in Laravel 6.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use App\Http\Controllers\Common\PhpMailController;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
@@ -51,7 +52,7 @@ class ForgotPasswordController extends Controller
|
||||
if (isset($user)) {
|
||||
$user1 = $user->email;
|
||||
//gen new code and pass
|
||||
$code = str_random(60);
|
||||
$code = Str::random(60);
|
||||
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->first();
|
||||
if (isset($password_reset_table)) {
|
||||
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]);
|
||||
|
Reference in New Issue
Block a user