Search
 
SCRIPT & CODE EXAMPLE
 

PHP

symfony redirect to previous page

/**
 * @Route ("/cart/add/{id}", name = "add_cart")
 */
public function add($id, CartService $cartservice, Request $request){
    $cartservice->add($id);

    $route = $request->headers->get('referer');

    return $this->redirect($route);
}
Comment

PREVIOUS NEXT
Code Example
Php :: updating-product stock quantity programmatically woocommerce 
Php :: select query in php 
Php :: php loop object 
Php :: wp get tagline php 
Php :: get all category custom post type wordpress dev 
Php :: get the full url in php 
Php :: dummy data in laravel 
Php :: php delete json object from a collection object 
Php :: auth.php Class "AppUser" not found 
Php :: laravel remove foreign key 
Php :: php date object to timestamp 
Php :: how to start laravel project 
Php :: get blog page url in wordpress 
Php :: laravel unique multiple columns 
Php :: laravel drop table column 
Php :: php fix array keys 
Php :: total days between two dates carbon 
Php :: laravel force delete 
Php :: install php 7.3 ubuntu 
Php :: get public_html directory php 
Php :: php uppercase first letter 
Php :: codeigniter 3 or where not in 
Php :: curl in laravel 
Php :: where is php.ini file in ubuntu 
Php :: laravel curl package 
Php :: php catch all exceptions 
Php :: print hello world in php 
Php :: convert laravel hash password online 
Php :: php add item to array 
Php :: What does PEAR stands for? 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =