laravel change post request before save

43

public function store(Request $request)
{
    $data = $request->all();
    $data['hostname'] = gethostbyaddr($_SERVER['REMOTE_ADDR'];

    Systems::create($data);
}

Comments

Submit
0 Comments