Answers for "laravel set request data"

PHP
0

laravel get data from request

dd($request->all());
//print an array of the input name and the input value
Posted by: Guest on July-04-2020
0

get request laravel

$user->date = date('Y-m-d');
	$user->completed_status = '0';

	$user->name=  $request->Input(['name']);



	protected function create(array $data)
{
    return User::create([
        'name' => $data['name'],
        'email' => $data['email'],
        'password' => bcrypt($data['password']),
    ]);
}


DB::table('users')->insert([
        'Email' => '[email protected]',
        'Name' => 'Administrator',
        'PhoneNumber' => '00000',
        'Password' => bcrypt('P@ssw0rd'),
        'isEnabled' => true,
        'isAdmin' => true
        ]);

Admin::create(['name' => 'Super Admin', 'email' => '[email protected]', 'password' => bcrypt('password') ]);
Posted by: Guest on October-12-2021

Browse Popular Code Answers by Language