I have a model (table) called Member. I want to do the id count that exists in the bank. Well I did with Member :: Count ('id'). It returns me everything nice and the total id I have on the table. More when I play the view it gives an error: Speaking I'm trying to get property and not object Trying to get property of non-object How do I make an appointment and send it to the 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);