0
I have a model (table)called Member. I want to do the id count that exists in the bank. I have well managed to do it with Member::Count(?id'). It returns me all pretty the total id that I have on the table. More when I play in the view it gives an error: Saying I’m trying to get property and not object Trying to get Property of non-object How I make an appointment and send her to View?
Controller public function create()
{
$membro = new Membro();
$ficha = $membro->countID();
$data = array(
'titulo' => 'Lista de membros',
'localizador' => 'Listagem de membro',
'info' => 'Listas de Membros',
'avatar' => Auth()->user(),
'ficha' => $ficha,
);
return view('dashboard.cadastroMembros.create', $data);
The code of the control?
– Mauricio Wanderley Martins
I edited the code
– Natan Melo
Add the view. To find where it cannot retrieve information
– Mauricio Wanderley Martins
membro->count()
change this in the code in yourcontroller
.– novic
this model now worked out vlw man obg
– Natan Melo