trait foo{
public function bar()
{
redirect('/'); //not working
}
}
use Traits;
class DonController extend Controller{
use Traits\foo;
$this->bar();
redirect('/'); //working
}
I'm new in Laravel, I need to create a redirect method inside of trait
However I have problem to do it inside of trait. Anyone know how to solve this?