-1
I’m encountering an error while trying to register data in the database.
ErrorException (E_WARNING) parse_url() expects parameter 1 to be string, array given
Productocontroller.php
public function cadastrar(Request $request)
{
$dados = $request->except('_token');
$result = $request::create($dados);
}
product-formulary.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 this way, using create. I’ve never had a problem.
You’re pointing something at me $components = parse_url($uri);
in the Request.php 363 file
But do not register in the bank using the variable
$request
...– Wallace Maxters
Sorry my friend. My mistake.
– Barraviera