Welcome Guest, Not a member yet? Register   Sign In
Problem with redirect-> to
#1

(This post was last modified: 07-03-2020, 11:22 PM by hugoafr.)

Hello,
sorry for my English,
I have a strange problem, redirection works fine when I call it from a method, but when I call it from a function it doesn't work.

Example:

PHP Code:
   //Example function to redirect
    public function _redirect_user(){
        return redirect()->to(site_url('proyecto/index'));
    }
    
    
//This does not work, it does not throw an error, it is just as if the process ended.
    public function my_method_a()    
    
{
        $this->_redirect_user();
    }
    
    
//This works fine.
    public function my_method_b()    
    
{
        return redirect()->to(site_url('proyecto/index'));
    
Reply


Messages In This Thread
Problem with redirect-> to - by hugoafr - 07-03-2020, 11:20 PM
RE: Problem with redirect-> to - by inumaru - 07-04-2020, 01:39 AM
RE: Problem with redirect-> to - by hugoafr - 07-04-2020, 11:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB