Answer the question
In order to leave comments, you need to log in
How to display pivot table records with paginator?
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
public function article()
{
return $this->belongsToMany('App\Services\Image');
}
}
$aaa = Category::find(3);
dd($aaa->article);
$aaa = Category::find(3)::paginate(2);
dd($aaa->article);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question