lundi 29 mars 2021

Laravel with() together Table or Variable Name

I was reading a blog related Repository Pattern. I saw use of withBlogs method.

public function index()
{
    $blogs = $this->blogRepository->all();

    return view('blog')->withBlogs($blogs);
}

I never see something like this before. What is the purpose of it or what it's doing?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3foPQHB
via IFTTT

Aucun commentaire:

Enregistrer un commentaire