Categories
CMS Magento Mastering Development

Exception: Type Error occurred when creating object: Magento\Framework\Mail\EmailMessage

Getting error when trying to send email via controller $email_Template = ‘hello_template’; $email_Subject = ‘Customer Registration Success’; $transport = $this->transportBuilder ->setTemplateIdentifier($email_Template) ->setTemplateOptions([‘area’ => \Magento\Framework\App\Area::AREA_FRONTEND, ‘store’ => $this->storeManager->getStore()->getId()]) ->setTemplateVars([ ‘name’ => ‘aaaa’, ’email’ => $data[’email’], ‘subject’ => $email_Subject ]) ->setFrom([‘name’ => ‘test’,’email’ => ‘test@gmail.com’]) ->addTo([$data[’email’]]) ->getTransport(); $transport->sendMessage(); How to debug the error. I have already tried […]

Categories
Mastering Development

Laravel canot register for new uses

I am creating a simple login function on my website with a registration feature. The registration feature is functional and users are appearing in the database. However, when I try to register new user, it did not inserted into database and stay on the same page and refresh data in form register. When I enter […]

Categories
Mastering Development

my register.blade don’t seems to work in laravel 6

I use the make:auth to create the register and login controller, then edited the form and validation correctly; <form method=”POST” action=””> @csrf <div class=”form-group row”> <label for=”firstname” class=”col-md-4 col-form-label text-md-right”></label> <div class=”col-md-6″> <input id=”name” type=”text” class=”form-control @error(‘firstname’) is-invalid @enderror” name=”firstname” value=”” required autocomplete=”firstname” autofocus> @error(‘firstname’) <span class=”invalid-feedback” role=”alert”> <strong></strong> </span> @enderror </div> </div> <div class=”form-group […]

Categories
Mastering Development

Laravel with google recaptcha v3 validation

Hi i need some help in laravel include the google recaptcha, i cant very the score, i only can recive the token form the recaptcha and when i try do the validation it comes always false i dont know why Register Controller protected function validator(array $data) { $messages = [ ’email.unique’ => __(‘frontend.email_in_use’), ]; $validate […]

Categories
Development

Laravel ‘Undefined variable:’ in User Controller

I want to sent thanks mail when users regist our service. But, This code is error Undefined variable: fhbvuileb in $message->to($fhbvuileb). Help ME!!! <?php namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use App\Providers\RouteServiceProvider; use App\User; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Crypt; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Mail; class RegisterController extends Controller { /** ~~~ **/ protected function create(array $data) { […]

Categories
Development

redirect a new user after registration to some page while send them some email

I was trying all of the step from this site : https://vegibit.com/how-to-send-email-to-new-users/ and find some problem in the route, “loginUsingId(1)” it’ll call user id 1 from database and I wan to change it with auto increment. So after a new user registered their self and their data was putted through database they will be taken […]

Categories
Development

How to concatenate primary key with random number in laravel?

I want to create users but before creating i want to generate and assign random numbers to them. For random numbers i want to generate first 4 digits random and remaining other digits primary key that is going to be assigned. For Example: there are already 5 data in my database. i want to add […]

Categories
Development

Adding new field containing file in Laravel registration

I wanted to customize the Laravel auth system by adding more fields to it. I wanted the user to upload a few images during registration, and I am not sure on what to add on the create() method in RegisterController to add the file name into the database, also the file itself to the public […]

Categories
Development

Trait method hasTooManyLoginAttempts has not been applied

I have upgraded my project from 5.2 to 5.3 in laravel. after that, I have the following error:- Trait method hasTooManyLoginAttempts has not been applied, because there are collisions with other trait methods on App\Http\Controllers\Auth\AuthController in D:\xampp1\htdocs\clubmart_frontend\ app\Http\Controllers\Auth\AuthController.php on line 19 Following is the code of my AuthController:- <?php namespace App\Http\Controllers\Auth; use App\Contracts\Repositories\UserRepositoryInterface; use App\Http\Controllers\Controller; […]

Categories
Development

Laravel 6: How to pass checkbox value into database user table upon registration

I have created a registration form using Laravel 6 default migration table and Auth register controller. Now I want to have two types of accounts, so I have a added a checkbox to the HTML form. If the checkbox is checked, the account should be of different type than when the checkbox in unchecked. What […]