Works in localhost but does not work with cpanel host
Closed this issue · 1 comments
matinwd commented
Thanks for your great package
I noticed this package works on localhost but it throws error on host cpanel
syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)
That is my code:
$valid = $this->valid($number);
if (!$valid) {
return response()->json(['errors' => [
'phone' => [
'شماره تلفن نامعتبر است'
]
]], 422);
}
$user = User::wherePhone($number)->first();
$user = $this->addUserIfDoesNotExist($user, $number);
$code = $this->addCode($user);
Sms::send("کد فعالسازی شما $code میباشد ")->to([$number])->dispatch();
I tried this also:
Sms::send("کد فعالسازی شما $code میباشد ")->to($number)->dispatch();
Thanks in advance!
tzsk commented
You need to check the server env vars and config file. Cpanel is not a very good option for Laravel Deployment, that's just my opinion.