fixed register
This commit is contained in:
@@ -10,6 +10,7 @@ use App\Models\User;
|
||||
use App\Services\ConfigService;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
|
||||
|
||||
|
||||
@@ -173,7 +174,9 @@ class AuthController extends Controller
|
||||
$customer = Customer::create($data);
|
||||
|
||||
if ($referrer) {
|
||||
$referrer->increment('total_referrals');
|
||||
if (Schema::hasColumn((new Customer)->getTable(), 'total_referrals')) {
|
||||
$referrer->increment('total_referrals');
|
||||
}
|
||||
if ($cfg->getBool('register_referral_sms_to_referrer', false)) {
|
||||
$messageRef = "{$data['name']} با کد معرف شما ثبت نام کرد.\nبا اولین خرید او پاداش دریافت میکنید.\n" . $this->Config('name_fa');
|
||||
$this->Send($referrer->mobile, $messageRef);
|
||||
|
||||
Reference in New Issue
Block a user