Custom complete registration with form in laravel
First you create view blade form in view folder
<form method="POST" action="{{ route('company/registration') }}">{{ csrf_field() }}
<div class="form-group {{ $errors->has('username') ? ' has-error' : '' }}">
<label>User Name</label>
<input id="name" type="name" class="form-control" placeholder="User Name" name="username" value="{{ old('username') }}" required
autofocus>
@if ($errors->has('username'))
<span class="help-block">
<strong>{{ $errors->first('username') }}</strong>
</span>
@endif
</div>
<div class="form-group {{ $errors->has('email') ? ' has-error' : '' }}">
<label>Email Id</label>
<input id="email" type="email" class="form-control" placeholder="Email" name="email" value="{{ old('email') }}" required>
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<div class="form-group {{ $errors->has('password') ? ' has-error' : '' }}">
<label>Password</label>
<input id="password" type="password" class="form-control" placeholder="Password" name="password" required>
@if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
<div class="form-group">
<input type="checkbox" name="item" >
<label>
Agree the terms and policy
</label>
</div>
<button type="submit" class="btn btn-primary btn-flat m-b-30 m-t-30">Register</button>
<div class="register-link m-t-15 text-center">
<p>Already have account ? <a href="{{url('company/login')}}"> Sign in</a></p>
</div>
</form>
You may create your own page according you i have create a sample page
create routes in laravel
for using to route first view the page and second is post the data
The route is look like this
Route::get('company/registration', 'Auth\CompanyRegistrationController@companyRegistrationForm');
Route::post('company/registration', 'Auth\CompanyRegistrationController@CompanyRegistration')->name('company/registration');
'companyRegistrationForm.php' is a controller to call the view if you want direct call the view using only route but security purpose i am using controller to call the view look like this
public function companyRegistrationForm()
{
return view('company/company-registraion');
}
good code write
ReplyDeletehiiiiiiiiiiiiiiiiiiiiiiiiiii
ReplyDelete