Undefined array key "school_name" using flatMap - laravel

i am using flatMap to get the keys and the value related together
but it gives me an error Undefined array key "school_name" i dont know why
although i do return $setting it gives me like this
{
setting: {
current_session: "2021-2022",
school_title: "MS",
school_name: "Mora Soft International Schools",
end_first_term: "01-12-2021",
end_second_term: "01-03-2022",
phone: "0123456789",
address: "القاهرة",
school_email: "info#morasoft.com",
logo: "1.jpg"
}
}
this is my table settings table
Schema::create('settings', function (Blueprint $table) {
$table->id();
$table->string('key');
$table->string('value');
$table->timestamps();
});
and this is my web.php route
Route::resource('settings', 'SettingController');
and here is my settingcontroller
/**
* Display a listing of the resource.
*
* #return \Illuminate\Http\Response
*/
public function index()
{
$collection = setting::all();
$setting['setting'] = $collection->flatMap(function ($collection){
return [$collection->key => $collection->value];
});
// return $setting;
return view('pages.settings.index',compact('setting'));
}
and here is my blade that views the form
<form enctype="multipart/form-data" method="post" action="{{route('settings.update','test')}}">
#csrf #method('PUT')
<div class="row">
<div class="col-md-6 border-right-2 border-right-blue-400">
<div class="form-group row">
<label class="col-lg-2 col-form-label font-weight-semibold">اسم المدرسة<span class="text-danger">*</span></label>
<div class="col-lg-9">
<input name="school_name" value="{{ $setting['school_name'] }}" required type="text" class="form-control" placeholder="Name of School">
</div>
</div>
<div class="form-group row">
<label for="current_session" class="col-lg-2 col-form-label font-weight-semibold">العام الحالي<span class="text-danger">*</span></label>
<div class="col-lg-9">
<select data-placeholder="Choose..." required name="current_session" id="current_session" class="select-search form-control">
<option value=""></option>
#for($y=date('Y', strtotime('- 3 years')); $y<=date('Y', strtotime('+ 1 years')); $y++)
<option {{ ($setting['current_session'] == (($y-=1).'-'.($y+=1))) ? 'selected' : '' }}>{{ ($y-=1).'-'.($y+=1) }}</option>
#endfor
</select>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label font-weight-semibold">اسم المدرسة المختصر</label>
<div class="col-lg-9">
<input name="school_title" value="{{ $setting['school_title'] }}" type="text" class="form-control" placeholder="School Acronym">
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label font-weight-semibold">الهاتف</label>
<div class="col-lg-9">
<input name="phone" value="{{ $setting['phone'] }}" type="text" class="form-control" placeholder="Phone">
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label font-weight-semibold">البريد الالكتروني</label>
<div class="col-lg-9">
<input name="school_email" value="{{ $setting['school_email'] }}" type="email" class="form-control" placeholder="School Email">
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label font-weight-semibold">عنوان المدرسة<span class="text-danger">*</span></label>
<div class="col-lg-9">
<input required name="address" value="{{ $setting['address'] }}" type="text" class="form-control" placeholder="School Address">
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label font-weight-semibold">نهاية الترم الاول </label>
<div class="col-lg-9">
<input name="end_first_term" value="{{ $setting['end_first_term'] }}" type="text" class="form-control date-pick" placeholder="Date Term Ends">
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label font-weight-semibold">نهاية الترم الثاني</label>
<div class="col-lg-9">
<input name="end_second_term" value="{{ $setting['end_second_term'] }}" type="text" class="form-control date-pick" placeholder="Date Term Ends">
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label font-weight-semibold">شعار المدرسة</label>
<div class="col-lg-9">
<div class="mb-3">
<img style="width: 100px" height="100px" src="{{ URL::asset('attachments/logo/'.$setting['logo']) }}" alt="">
</div>
<input name="logo" accept="image/*" type="file" class="file-input" data-show-caption="false" data-show-upload="false" data-fouc>
</div>
</div>
</div>
</div>
<hr>
<button class="btn btn-success btn-sm nextBtn btn-lg pull-right" type="submit">{{trans('Students_trans.submit')}}</button>
</form>

Related

Method Illuminate\Database\Eloquent\Collection::save does not exist

i have a problem when updating the database
error: Method Illuminate\Database\Eloquent\Collection::save does not exist.
controller:
public function actualizar(Request $request){
$nuevoIngreso = \App\Models\Servicio::all();
$nuevoIngreso->costo = $request->costo;
$nuevoIngreso->duracion = $request->duracion;
$nuevoIngreso->mantenimiento = $request->mantenimiento;
$nuevoIngreso->save();
return redirect('servicios')->with('mensaje', 'Ficha Actualizada.');
}
blade.php
<form method="POST" action="{{ route('actualizar') }}">
{{method_field('PUT')}}
#csrf
#foreach ($servicios as $costo)
<h1 class="text-center text-primary"> {{$costo->tipo}} </h1>
<div class="form-group row">
<label for="example-text-input" class="col-md-2 col-form-label form-control-label">Costo</label>
<div class="col-md-10">
<input class="form-control" type="text" value="{{$costo->costo}}">
</div>
<label for="example-text-input" class="col-md-2 col-form-label form-control-label">Duración</label>
<div class="col-md-10">
<input class="form-control" type="text" value="{{$costo->duracion}}" id="example-text-input">
</div>
<label for="example-text-input" class="col-md-2 col-form-label form-control-label">Mantenimiento</label>
<div class="col-md-10">
<input class="form-control" type="text" value="{{$costo->mantenimiento}}" id="example-text-input">
</div>
</div>
<hr>
#endforeach
<button type="submit" class="btn btn-success float-right" float-rightdata-toggle="sweet-alert" data-sweet-alert="success">SAVE</button>
</form>
help please
Error is clear.you are calling static method all().So it should be
$nuevoIngreso =new \App\Models\Servicio();
$nuevoIngreso->costo = $request->costo;
$nuevoIngreso->duracion = $request->duracion;
$nuevoIngreso->mantenimiento = $request->mantenimiento;
$nuevoIngreso->save();
So if you are thinking to update particular record then find by id or any column
$nuevoIngreso =new \App\Models\Servicio::find($id);
$nuevoIngreso->costo = $request->costo;
$nuevoIngreso->duracion = $request->duracion;
$nuevoIngreso->mantenimiento = $request->mantenimiento;
$nuevoIngreso->save();
Updated
<form method="POST" action="{{ route('actualizar') }}">
{{method_field('PUT')}}
#csrf
#foreach ($servicios as $key=>$costo)
<h1 class="text-center text-primary"> {{$costo->tipo}} </h1>
<input class="form-control" type="hidden" value="{{$costo->id}}" name="service[{{$key}}][id]">
<div class="form-group row">
<label for="example-text-input" class="col-md-2 col-form-label form-control-label">Costo</label>
<div class="col-md-10">
<input class="form-control" type="text" value="{{$costo->costo}}" name="service[{{$key}}][costo]">
</div>
<label for="example-text-input" class="col-md-2 col-form-label form-control-label">Duración</label>
<div class="col-md-10">
<input class="form-control" type="text" value="{{$costo->duracion}}" id="example-text-input" name="service[{{$key}}][duracion]">
</div>
<label for="example-text-input" class="col-md-2 col-form-label form-control-label">Mantenimiento</label>
<div class="col-md-10">
<input class="form-control" type="text" value="{{$costo->mantenimiento}}" id="example-text-input" name="service[{{$key}}][mantenimiento]">
</div>
</div>
<hr>
#endforeach
<button type="submit" class="btn btn-success float-right" float-rightdata-toggle="sweet-alert" data-sweet-alert="success">SAVE</button>
</form>
Then in controller
foreach($request->service as $key=>$value){
$nuevoIngreso =new \App\Models\Servicio::find($value['id']);
if($nuevoIngreso){
$nuevoIngreso->costo = $value['costo'];
$nuevoIngreso->duracion = $value['duracion'];
$nuevoIngreso->mantenimiento = $value['mantenimiento'];
$nuevoIngreso->save();
}
}

I keep getting an Integrity constraint violation when I'm trying to submit data to db

I have this problem and I have no idea why it's not working. I have tried so many code changes but I still get the same error when I try to submit a form. It's a simple form to insert data to tomany tables in db. All tables accept data with no error but payment_agrement table gives me this error:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (kassemschool.payment_agrements, CONSTRAINT payment_agrements_responisbleid_foreign FOREIGN KEY (responsible_id) REFERENCES payment_agrements (id)) (SQL: insert into payment_agrements (frais_inscription, payment_mois, Assurance, Garde, Transport, responsible_id, updated_at, created_at) values (450, 550, 400, 200, 300, 154, 2019-11-16 19:47:39, 2019-11-16 19:47:39))
This is my controller:
if(request()->has('rName')) {
$responsible = Responsible::create([
'ResponsibleName'=> $request->rName,
'ResponsibleCNI'=>$request->cni,
'responsible_number'=>$request->tele
]);
}
//Student::create($data);
if(request()->has('MontantP')) {
$payment=Payment::create([
'PaymentPaid'=>$request->MontantP,
'PaymentRemaining'=>$request->RestP,
'responsible_id'=>$responsible->id,
]);
}
if($request->hasFile('file')){
$student->images = $request->file->store('file');
}
if(request()->has('TransportR')) {
$transport=Transport::create([
'TransportPaid'=> $request->TransportP,
'TransportRemainning'=>$request->TransportR,
'TransportDateStart'=>$request->TdateStart,
'TransportDateEnd'=>$request->TdateEnd,
]);
}
if(request()->has('edateStart')) {
$payment_date = Payment_Date::create([
'PaymentDateStart'=>$request->edateStart,
'PaymentDateEnd'=>$request->edateEnd,
'payment_id'=>$payment->id,
]);
$letter = 'KassN';
$number =$request->env . 'G';
$number2 = $request->group;
$id='_'.rand();
$random = $letter.$number.$number2.$id;
if(request()->has('fName')) {
$student = Student::create([
'StudentFName'=> $request->fName,
'StudentLName'=> $request->lName,
'StudentDateStart'=>$request->edateStart,
'StudentDateEnd'=>$request->edateEnd,
'level_id'=> $request->env,
'group_id'=>$request->group,
'responsible_id'=> $responsible->id,
'payment_date_id'=>$payment_date->id,
'Payment_dure_id'=>$request->paymentD,
'payment_id'=>$payment->id,
'transport_id'=>$transport->id,
'student_code'=>$random
]);
}
if(request()->has('inscription')){
$agrement= Payment_agrement::create([
'frais_inscription'=>$request->inscription,
'payment_mois'=>$request->payment,
'Assurance'=>$request->assaurance,
'Garde'=>$request->garde,
'Transport'=>$request->fraiTransport,
'responsible_id'=>$responsible->id
]);
}
my create view
#extends('layouts.app')
#section('content')
#if (Route::has('login'))
#auth
#if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
back to <strong>Home</strong>
back to <strong>list</strong>
</div>
#endif
<div class="mr-auto offset-md-1" style="width: 200px;">
<input type="button" class="btn btn-danger btn-sm" name="" value="<- Reteur">
</div>
<div class="card-body">
<div class="container" style="width: 80%;">
<form action="{{url('student')}}" method="POST">
{{ csrf_field() }}
<div class="form-group">
<label for="firstName">First Name </label>
<input type="text" class="form-control" name="fName" id="elastName">
</div>
<div class="form-group">
<label for="lastName">Last name:</label>
<input type="text" class="form-control" name="lName" id="efirstName">
</div>
<div class="form-group">
<label for="responsable">Responsable Name:</label>
<input type="text" class="form-control" name="rName" id="responsable">
</div>
<div class="form-group">
<label for="cni">Responsable CNI:</label>
<input type="text" class="form-control" name="cni" id="cni">
</div>
<div class="form-group">
<label for="nuveau">Niveau:</label>
<div class="input-group mb-3">
<div class="input-group-prepend">
<label class="input-group-text" for="nuveau">Options</label>
</div>
<select class="custom-select" id="nuveau" name="env">
<option selected>Choose...</option>
#foreach($levels as $level)
<option value="{{$level->id}}">{{$level->LevelName}} </option>
#endforeach
</select>
</div>
</div>
<div class="form-group">
<fieldset>
<legend>Aggrement:<hr></legend>
<div class="form-group">
<label for="cni">Frais de inscription:</label>
<input type="text" class="form-control" name="inscription" id="cni">
</div>
<div class="form-group">
<label for="cni">paiement mensuel:</label>
<input type="text" class="form-control" name="payment" id="cni">
</div>
<div class="form-group">
<label for="cni">Frais de Assurance:</label>
<input type="text" class="form-control" name="assaurance" id="cni">
</div>
<div class="form-group">
<label for="cni">Frais de Garde:</label>
<input type="text" class="form-control" name="garde" id="cni">
</div>
<div class="form-group">
<label for="cni">Frais de transport:</label>
<input type="text" class="form-control" name="fraiTransport" id="cni">
</div>
</fieldset>
</div>
<div class="form-group">
<label for="nuveau">Group:</label>
<div class="input-group mb-3">
<div class="input-group-prepend">
<label class="input-group-text" for="group">Options</label>
</div>
<select class="custom-select" id="nuveau" name="group">
<option selected>Choose...</option>
#foreach($groups as $group)
<option value="{{$group->id}}">{{$group->group_name}}</option>
#endforeach
</select>
</div>
</div>
<div class="form-group">
<label for="payment">Payment:</label>
<div class="input-group mb-3">
<div class="input-group-prepend">
<label class="input-group-text" for="payment">Options</label>
</div>
<select class="custom-select" id="payment" name="paymentD">
<option selected>Choose...</option>
#foreach($payment_dures as $payment_dure)
<option value="{{$payment_dure->id}}">{{$payment_dure->payment_dure_name}}</option>
#endforeach
</select>
</div>
</div>
<div class="form-group">
<label for="dateStart"></label>
<input type="date" class="#" id="dateStart" style="width: 49%;" name="edateStart">
<label for="dateEnd">au:</label>
<input type="date" class="#" id="dateEnd" style="width: 44%;" name="edateEnd">
</div>
<div class="form-group">
<label for="MontantP">Montant paye:</label>
<div class="input-group mb-3">
<input type="text" class="form-control" name="MontantP" placeholder="" id="MontantP">
<div class="input-group-append">
<span class="input-group-text">DH</span>
</div>
</div>
</div>
<div class="form-group">
<label for="RestP">Rest a paye paye:</label>
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="" id="MontantR" name="RestP">
<div class="input-group-append">
<span class="input-group-text">DH</span>
</div>
</div>
</div>
<p>
<a class="btn btn-primary" data-toggle="collapse" href="#multiCollapseExample1" role="button" aria-expanded="false" aria-controls="multiCollapseExample1" style="width: 100%">Bus subscribtion</a>
<div class="row">
<div class="col">
<div class="collapse multi-collapse" id="multiCollapseExample1">
<div class="card card-body">
<div class="form-group">
<div class="form-group">
<label for="TMontantP">Montant paye:</label>
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="" id="TMontantP" name="TransportP">
<div class="input-group-append">
<span class="input-group-text">DH</span>
</div>
</div>
</div>
<div class="form-group">
<label for="TRestP">Rest a paye paye:</label>
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="" id="TRestP" name="TransportR">
<div class="input-group-append">
<span class="input-group-text">DH</span>
</div>
</div>
</div>
<div class="form-group">
<label for="TdateStart"></label>
<input type="date" class="#" id="TdateStart" style="width: 48%;" name="TdateStart">
<label for="dTateEnd">au:</label>
<input type="date" class="#" id="TdateEnd" style="width: 44%;" name="TdateEnd">
</div>
</div>
</div>
</div>
</div>
</div>
</p>
<br>
<button type="submit" class="btn btn-secondary">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
#else
<div class="d-flex justify-content-center text-center">
<div class="alert alert-danger" role="alert" style="width: 70%">
identifié vous d'abord
</div>
</div>
#endauth
#endif
#endsection
Looks like your foreign key constraint isn't setup correctly. From the look of the error you have setup payment_agrements.responsible_id to point to payment_agrements.id instead of responsibles.id.
In the migration for that table, that field probably looks like this:
$table->foreign('responsible_id')->references('id')->on('payment_agrements');
When it should be:
$table->foreign('responsible_id')->references('id')->on('responsibles');

How can I get it to validate my inputfield

The inputfield dosn't get validated it make a postrequest anyway wether or not the validations is valid
I have watched and followed serial youtube vidos, without any lock.
I have also tried to read the documentation but I couldn't find the error
MY Controller:
public function changepassword(Request $request)
{
$request->validate([
'passwordA' => 'string', 'min:8', 'same:passwordB',
'passwordB' => 'string', 'min:8',
]);
}
My view:
#extends('layouts.app')
#section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12">
<div class="card">
<div class="card-header">Profil</div>
<div class="card-body">
<form method="POST" action="userprofile">
#csrf
<div class="form-group row">
<label for="username" class="col-sm-2 col-form-label">Username</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="username" placeholder="{{ $user->email }}" readonly>
</div>
</div>
<div class="form-group row">
<label for="name" class="col-sm-2 col-form-label">Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="name" placeholder="{{ $user->firstname }} {{$user->surname}}" readonly>
</div>
</div>
<div class="form-group row">
<label for="phone" class="col-sm-2 col-form-label">Phonenumber</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="phone" placeholder="{{ $user->telephonenr }}" readonly>
</div>
</div>
<div class="form-group row">
<div class="col-sm-12">
<label class="col-sm-12 col-form-label">Rest password</label>
</div>
</div>
<div class="form-group row">
<label for="passwordA" class="col-sm-2 col-form-label">New-Password</label>
<div class="col-sm-10">
<input type="password" class="form-control #error('passwordA') is-invalid #enderror" id="passwordA" name="PasswordA">
#error('passwordA')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
</div>
<div class="form-group row">
<label for="passwordB" class="col-sm-2 col-form-label">Type again</label>
<div class="col-sm-10">
<input type="password" class="form-control #error('passwordB') is-invalid #enderror" id="passwordB" name="PasswordB">
#error('passwordB')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
</div>
<button type="submit" class="btn btn-primary">save</button>
</form>
</div>
</div>
</div>
</div>
</div>
#endsection
I was expected to validate the input and when I dosn't fit to the validating criteria the it should show the validation error

How to solve this error in laravel "Name and email address are required if not a client"

I'm getting an error as "Name and email address are required if not a client" while running the below mentioned code.
Find below the Controller Code:
class UserController extends Controller
{
public function insertform(){
return view('test');
}
public function create(){
$user=Whmcs::AddClient([
'firstname' => Input::get('firstname'),
'lastname' => Input::get('lastname'),
'email' => Input::get('email'),
'address1' => Input::get('address1'),
'city' => Input::get('city'),
'state' => Input::get('state'),
'postcode' => Input::get('postcode'),
'country' => Input::get('country'),
'phonenumber' => Input::get('phonenumber'),
'password2' => Input::get('password2'),
]);
return $user;
}
}
Find below the route code:
Route::get('insert', 'UserController#insertform');
Route::post('create', 'UserController#create')->name('user.create');
The blade file is given below
<div id="content" class="app-content" role="main">
<div class="app-content-body ">
<div class="bg-light lter b-b wrapper-md">
<h1 class="m-n font-thin h3">Sign up</h1>
</div>
<div class="wrapper-md" ng-controller="FormDemoCtrl">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading font-bold">create an account</div>
<div class="panel-body">
<form class="bs-example form-horizontal" action="
{{route('user.create')}}" method="post">
<input type = "hidden" name = "_token" value = "<?php echo
csrf_token(); ?>">
<div class="form-group">
<label class="col-lg-2 control-label">firstname</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="firstname"
placeholder="Name">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">lastname</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="lastname"
placeholder="Name">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">Email</label>
<div class="col-lg-6">
<input type="email" class="form-control" name="email"
placeholder="Email">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">address1</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="address1"
placeholder="Subject">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">city</label>
<div class="col-lg-6">
<select class="form-control" name="city">
<option value="-- Select --">-- Select --</option>
<option value="Coimbatore">Coimbatore</option>
<option value="Chennai">Chennai</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">state</label>
<div class="col-lg-6">
<select class="form-control" name="state">
<option value="-- Select --">-- Select --</option>
<option value="Tamilnadu">Tamilnadu</option>
<option value="Andhra">Andhra</option>
<option value="Karnataka">Karnataka</option></select>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">country</label>
<div class="col-lg-6">
<select class="form-control" name="country">
<option value="-- Select --">-- Select --</option>
<option value="India">India</option>
<option value="China">China</option>
<option value="Australia">Australia</option></select>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">postcode</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="postcode"
placeholder="postcode">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">phonenumber</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="phonenumber"
placeholder="phonenumber">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">password</label>
<div class="col-lg-6">
<input type="password" class="form-control" name="password2"
placeholder="password">
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button type="submit" class="btn btn-sm btn-
success">Login</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
When I run the above code I'm getting an error as below:
{"result":"error","message":"Name and email address are required if not a client"}
suggest me a solution to solve this and post the data in laravel.

Laravel csrf_field() Is Blank

I am learning about Packages in Laravel 5.4 and ultimately I will upload them to github.
This is my directory structure :
laravel
-vendor
--student
---myPackage
----src
-----Views
------myView.blade.php
the myView.blade.php has a form in it, and a {{csrf_field()}} function call, but when I inspect the output in the browser, the value attribute of the hidden input <input name="_token" value="" type="hidden"> is empty.
How do I make this work ?
SOLUTION
Apparantly, I needed to make sure that the web middleware is in use
for my routes, so I changed Route::get('/Register/{group}',
'Student\myPackage\Http\User#create'); to
Route::get('/Register/{group}',
'Student\myPackage\Http\User#create')->middleware('web');
Route:
Route::get('/Register/{group}', 'Student\myPackage\Http\User#create');
Route::post('/Register/{group}', 'Student\myPackage\Http\User#store');
Controller:
public function create($group){
return view('StudentUser::app', ['group' => $group]);
}
public function store($group)
{
dd(request()->all());
}
Form:
<form class="form-horizontal" role="form" method="POST" action="/Register/{{$group}}">
<div class="tab-content">
<div id="ap-about" class="tab-pane active">
{!! csrf_token() !!}
<div class="form-group">
<label for="name" class="col-md-4 control-label">Name</label>
<div class="col-md-6">
<input id="name" type="text" class="form-control" name="name" value="" required autofocus>
</div>
</div>
<div class="form-group">
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
<div class="col-md-6">
<input id="email" type="email" class="form-control" name="email" value="" required>
</div>
</div>
<div class="form-group">
<label for="password" class="col-md-4 control-label">Password</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control" name="password" required>
</div>
</div>
<div class="form-group">
<label for="password-confirm" class="col-md-4 control-label">Confirm Password</label>
<div class="col-md-6">
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="button" class="btn btn-primary">
Next
</button>
</div>
</div>
</div>
<div id="ap-personal" class="tab-pane">
<div class="form-group">
<label for="address" class="col-md-4 control-label">Address</label>
<div class="col-md-6">
<input id="address" type="text" class="form-control" name="personal[]" value="" required autofocus>
</div>
</div>
<div class="form-group">
<label for="url" class="col-md-4 control-label">url</label>
<div class="col-md-6">
<input id="url" type="text" class="form-control" name="personal[]" value="" required autofocus>
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Register
</button>
</div>
</div>
</div>
</div>
</form>

Resources