Welcome Guest, Not a member yet? Register   Sign In
$this->validation->withRequest($this->request)->run() behavior
#2

Yes, that's the way it's currently designed. There's a simpler way to use it, though.

From the manual:

Code:
class Form extends Controller
{
    public function index()
    {
        helper(['form', 'url']);

        if (! $this->validate($this->request, []))
        {
            echo view('Signup', [
                'validation' => $this->validation
            ]);
        }
        else
        {
            echo view('Success');
        }
    }
}
Reply


Messages In This Thread
RE: $this->validation->withRequest($this->request)->run() behavior - by kilishan - 04-20-2017, 11:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB