Laravel Routes 5.6

0

Gentlemen, I'm having trouble setting the wheels and I get the following error:

protected function methodNotAllowed(array $others)
{
    throw new MethodNotAllowedHttpException($others);
}

I'm doing them as follows:

route / web.php

$this->post('cadastrar-sub-categoria', 'CategoriaController@cadastrarSubCategoria')->name('cadastrarSubCategoria');

controller.php

public function cadastrarSubCategoria(){
    return 'OK';
}

Where can I be wrong? I'm starting my studies on laravel 5.6!

Thank you.

    
asked by anonymous 21.05.2018 / 21:16

0 answers