Use str_random instead of RandomHelper (#571)

Laravel has a built-in string randomiser function, no need to
hand-roll a custom one.

https://laravel.com/docs/5.4/helpers#method-str-random
This commit is contained in:
Ng Yik Phang
2017-10-04 11:33:17 +08:00
committed by Régis Freyd
parent 57b372553b
commit a3fed98de0
6 changed files with 4 additions and 55 deletions
@@ -7,7 +7,6 @@ use App\User;
use Validator;
use App\Account;
use Carbon\Carbon;
use App\Helpers\RandomHelper;
use App\Jobs\SendNewUserAlert;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers;
@@ -93,7 +92,7 @@ class RegisterController extends Controller
// create a new account
$account = new Account;
$account->api_key = RandomHelper::generateString(30);
$account->api_key = str_random(30);
$account->created_at = Carbon::now();
$account->save();