The method View::make accepts two arguemnts:
return View::make('about', compact('title'));
// or
return View::make('about', ['title' => $title]);
// or
return View::make('about')->with('title', $title);
// or
return View::make('about')->withTitle($title);
All these do the same ;D
Hi,
I tried them but I got this error msg: Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException
if (!is_null($route)) {
return $route->bind($request);
}
$others = $this->checkForAlternateVerbs($request);
if (count($others) > 0) {
return $this->getOtherMethodsRoute($request, $others);
}
throw new NotFoundHttpException();
}
protected function checkForAlternateVerbs($request)
Not sure whats wrong.
hc.
How do you set your ~~~ $title ~~~ variable?
I'm so sorry, it actually works. I got typo somewhere on the code.
Thanks for helping.
Hc.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community