Isuka
0
Q:

Writing into the database with one click laravel

public function manuelSignUP()
{
DB :: table("users") -> insertGetId
(
array("firstname" => "John", "lastname"=> "John",
"passwordHash" => "password", "userslevelID" => 2)
);

DB :: table("userlevel") -> insertGetID
  (

array("userlevelID" => $userlevelID, "name" => $name)
 );

 return view("pages.manualsignup");
 }
0
<!DOCTYPE html>
 <html>
<head> </head>

<body> This should  </body>
<br><br><br><br>
<form method="post">
<button type="button"> submit </button>
</form>
</html>
0
<form action="{{ route('signup') }}" method="post">
    <button type="submit"> submit </button>
</form>
0
Route::post('/signup', [
    'as'   => 'signup',
    'uses' => 'YourController@manuelSignUP',
]);
0

New to Communities?

Join the community