I have a table related to other PRODUCTS AND MARKS, what happens is that when I create brands and products everything is going well. The problem is when I delete a brand and create another one, and when creating a new product with a role, it sends me the following error:
In my controller I have:
public function create()
{
$marks = Mark::lists('name','id')->prepend('Seleccioname la Marca');
return view('product.create')->with('marks',$marks);
}
And in the view:
{!! Form::select('marks_id',$marks,null,['id'=>'marks_id','class'=>'form-control']) !!}
I have these records in marks with their id:
But when I see the source code, I get a list from value 1 to n that are not correct.