Casey
Casey

Reputation: 1981

Laravel view not displaying; not as easy as you would think

Maybe this is something simple, but I'll danged if I can find it. Here is my controller

public function index($vendors)
{
    return View::make('orders.index', compact('vendors'));
}

public function indexAll()
{
    $vendors= $this->orderingService->getListByVendor();

    $this->index($vendors);
}

Nothing shows up on the page. But if I copy that return View::make to the indexAll method it works fine. And I do mean copy and paste. If I put a dd($vendors) before the return in the index method it dumps out just like you would think. I put a dd in the very first line of the view and still got nothing. There is no errors in the logs. Any idea what is going on?

Upvotes: 1

Views: 43

Answers (1)

mopo922
mopo922

Reputation: 6381

You're not returning the return in indexAll(). Just modify that last line to be:

return $this->index($vendors);

Upvotes: 4

Related Questions