4
I have the following relationship in my Model
Client:
public function Usuario(){
return $this->hasMany('SIST\Models\Admin\Usuario', 'id_cliente');
}
I pass the customer data through my Controller
:
$cliente = Cliente::find($id_cliente);
return view('admin/usuario/index',['cliente' => $cliente]);
And I list users in my View
:
@foreach($cliente->Usuario as $usuario)
I need to know how to paginate the results.
IS
links()
,render()
ortantofaz()
?– Diego Souza
Really ? It’s in the documentation. https://laravel.com/docs/5.1/pagination#Displaying-Results-in-a-view
– Diego Souza
It is to show the pagination links on
view
yes. Direct use ofrender()
.– Diego Souza
I’ll see. I don’t know the
Paginator
. I didn’t mean you’re wrong and I’m right. Thelinks()
flame torender
.return $this->render($presenter);
. It’s just the name of the call... thanks!– Diego Souza
@Zoom was worried about being wrong. I do not use the Laravel 5, I use the 4. But as they say that is almost the same thing, I risked to answer :D
– Wallace Maxters
I started using Lavarel in 4.2. After the 5.0 came out... I already migrated. The hard is paging on mobile device.
– Diego Souza
Okay, thank you very much!
– Raylan Soares