Skip to content

Instantly share code, notes, and snippets.

@tisuchi
Created May 18, 2018 04:57
Show Gist options
  • Select an option

  • Save tisuchi/b3b8697a16e104e331bac40b11958397 to your computer and use it in GitHub Desktop.

Select an option

Save tisuchi/b3b8697a16e104e331bac40b11958397 to your computer and use it in GitHub Desktop.
How to add values to Request array in Laravel
<?php
function store(Request $request)
{
$valueYouWantToAdd = "Your some data";
$request->request->add(['arrayKeyName' => $valueYouWantToAdd]);
//now return to check whether working or not
return $request->all();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment