Last active
March 6, 2016 16:47
-
-
Save FWSimon/917e459b304bc6e99f35 to your computer and use it in GitHub Desktop.
return invoiceItems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function Preview(Request $request) | |
{ | |
$inputs = $request->all(); | |
$quantity = $inputs['quantity']; | |
$description = $inputs['description']; | |
$price = $inputs['price']; | |
dd($inputs); | |
$client = Client::find($inputs['client']); | |
return view('invoices.preview', compact('inputs', 'client', 'invoiceItems')); | |
} | |
My `dd()` return this | |
array:9 [▼ | |
"_token" => "1ReVum1ccihEpDgVIybxDinMGqv9EvfkziNQ41gP" | |
"client" => "1" | |
"day" => "5" | |
"month" => "2" | |
"year" => "2016" | |
"notes" => "sfsdfdsfs" | |
"quantity" => array:3 [▼ | |
0 => "1" | |
1 => "1" | |
2 => "1" | |
] | |
"description" => array:3 [▼ | |
0 => "sdfsdfd" | |
1 => "sfsfdsdf" | |
2 => "bvcbcvv" | |
] | |
"price" => array:3 [▼ | |
0 => "2322" | |
1 => "2321" | |
2 => "2222" | |
] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hvad med en
eller måske mere Laravel agtigt (jeg har aldrig kodet Laravel, så sig til hvis jeg tager fejl)
hvor hhv. quantity, description og price vil lægge i element 0, 1 og 2 i dit array... (ud fra hvad jeg lige kan læse i Laravel docs)