Answers for "how to directly transfer data from html to controller in laravel"

4

laravel load view in variable

$html = view('users.edit', compact('user'))->render();
Posted by: Guest on October-07-2020
1

return view with variable laravel

return View::make('blog')->with('posts', $posts);
Posted by: Guest on February-09-2021
0

how to directly transfer data from html to controller in laravel

public function users(Request $request)
{
    $name = $request->input('firstname'); // This is better than using $_POST
    $lastname = $request->input('lastname');

    DB :: table("newUsers") -> insertGetId
    (
        array("firstname" => $name, "lastname" => $lastname, "email" => "test")
     );

    return view("pages.users");
}
Posted by: Guest on February-10-2021
0

how to directly transfer data from html to controller in laravel

$request->input('firstname');
Posted by: Guest on February-10-2021

Code answers related to "how to directly transfer data from html to controller in laravel"

Browse Popular Code Answers by Language