I'm encountering an error when trying to register data in the database.
ErrorException (E_WARNING) parse_url() expects parameter 1 to be string, array given
ProductController.php
public function cadastrar(Request $request)
{
$dados = $request->except('_token');
$result = $request::create($dados);
}
product-form.blade.php
<form method="post" action="{{route('cadastrar')}}">
{!! csrf_field() !!}
<input type="text" name="produto">
<input type="text" name="descricao">
<input type="text" name="modelo">
<input type="submit" value="Ok">
</form>
I've always done it that way, using create. I've never had problems.
Is it pointing to something in $components = parse_url($uri);
in the Request.php file 363