Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
protected function create(array $data)
$user = User::create([
'first_name' => $data['first_name'],
'last_name' => $data['last_name'],
'username' => strtolower($data['first_name'] . $data['last_name']),
'phone' => $data['phone'],
'email' => $data['email'],
'verified' => false,
'role' => 'admin',
'user_type' => 'carrier',
'password' => Hash::make($data['password']),
'boss_id' => $user->id,
'name' => $data['name'],
'siret' => $data['siret'],
'address' => $data['address'],
'legal_redress' => $data['legal_redress'],
'customer_reference' => $data['customer_reference'],
'judicial_liquidation' => $data['judicial_liquidation'],
'turnover' => $data['turnover'],
'net_profit' => $data['net_profit'],
'employees_count' => $data['employees_count'],
'insurance_document' => "toto",
return redirect()
->with('success', "Votre compte a bien été créé")
->with('warning', "Le compte vous sera validé sous 24 heures ouvrées");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.