Home>
For redirect ()->route ('index') etc. in laravel
I don't know how to pass multiple values when redirecting to a different route.
As a result of checking the log, the status code was 405 when redirecting to the target page.
How to display multiple values given together at the time of redirect at the redirect destination
Please tell me if you know.
return redirect ()->route ('index')->with ('item', $item->name)->with ('price', $item- >price);
Redirect destination description
Product name: {{session ('item')}}
Amount: {{session ('price')}}
-
Answer # 1
-
Answer # 2
https://laravel.com/api/5.8/Illuminate/Http/RedirectResponse.html#method_with
It seems to be able to respond by passing an array as a parameter of
Please check the link once
Related articles
- php - i can't access the value i got using get in laravel from view
- php - about the value stored in laravel db
- php - laravel: value obtained by pluck cannot be obtained by foreach
- php - about gate by the value of laravel relation destination
- php - i want to set a gate with the value of the laravel relation
- php - i want to send a value when redirecting with the header function
- php - laravel: i want to resolve the error target class [***] does not exist
- php - i want to check the array and put its value in the database if there are no duplicates
- php - i want to specify the value of getmimetype () in the part to do new uploadedfile ()
- should i use `filter_var` for php's` $_post` value?
- php - laravel command does not work
- php - function execution and return value after routing without framework
- php - about overriding the laravel controller method
- i want to group by a specific value between php associative arrays and aggregate them
- php - a new project is created in laravel 803 i would like to create it in 830
- php - display of laravel project welcome page on sakura vps (centos7), nginx
- php - about laravel eloquent
- php - i would like to know how to get each past numerical value with "ahrefs api"
- php - about the scope of laravel variables
- php - what version should i use when using laravel in practice?
Related questions
- php : Laravel combine result from 2 tables into one
- php - about searching with laravel where clause
- php - i can't upload a file with laravel's form tag (file attribute)
- php - i want to set the number of characters of email created by laravel faker to 25 characters or less
- php - [laravel] how to read and use the class of another file in controller
- php - about the value stored in laravel db
- php - e-mail transmission with laravel is garbled
- after upgrading the php version of the rental server from 58 to 74, composer stopped working on ssh connections
- php - i can't connect to mysql in laravel js
- php - i built an environment with docker and laravel, but i get a 404 file not found
I wonder if this can be done
Controller side View sideI wonder if there are other references below
[Laravel] Route (), view () and redirect () frequently used in Laravel-Qiita
If the value passed is an array,
I didn't do it