findAllWithRelation() public method

Find all blog with category.
public findAllWithRelation ( ) : Illuminate\Database\Eloquent\Collection | Blog[]
return Illuminate\Database\Eloquent\Collection | Learner\Models\Blog[]
Exemplo n.º 1
0
 /**
  * Get all blogs with relation.
  *
  * /admin/blogs get
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function index()
 {
     $blogs = $this->blogs->findAllWithRelation();
     return $this->responseJson(compact('blogs'));
 }