jeudi 16 février 2017

Laravel 5 Collecting Post Data

I am having an issue with working with post data.

For example, if i have a simple little form :

<form action='/leads/getpost' method='POST'>
<input type='text' name='Domain'>
<input type='submit' name='submit'>

AND then collect the data and try echo it out :

public function getPost()
    {
        $formData = Request::all() ;
        var_dump($formData);

        //
    }

I get an error : MethodNotAllowedHttpException in RouteCollection.php line 218:

If i do the same thing using GET it works fine.

I tried to edit the VerifyCsrfToken and added :

protected $except = [ 'leads/getpost'
        //
    ];

Still not working.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2lbSD8Q
via IFTTT

Aucun commentaire:

Enregistrer un commentaire