1
I need to show two categories in one view
. I tried the way below, but without success:
public function index()
{
return View::make('Titles.IndexFutebol')->withType('time1')->withType('time2');
}
only shows type time2
.
1
I need to show two categories in one view
. I tried the way below, but without success:
public function index()
{
return View::make('Titles.IndexFutebol')->withType('time1')->withType('time2');
}
only shows type time2
.
0
From what I read in the comments you are using version 4.2 of the Standard (does not consider gives an upgrade?).
Try it this way:
public function index()
{
return View::make('Titles.IndexFutebol')->with('type', $time1, $time2);
}
Browser other questions tagged laravel laravel-4
You are not signed in. Login or sign up in order to post.
What version of Laravel?
– Valdeir Psr
Laravel version is 4.2
– user100984
Have you tried with
View::make('Titles.IndexFutebol')->with('time1', $time1)->with('time2', $time2);
?– Valdeir Psr
public Function index() { $time1= Title::Where('type', 'Athltico'); $time2= Title::Where('type', 'cruzeiro'); Return View::make('Titles.Indexfootball')->with('type', $time1)->with('type', $time2); }
– user100984
and so app.viewModels.Titles.index.start('cruise','Athltico');
– user100984
You can’t repeat the name
type
– Valdeir Psr
Return View::make('Titles.Indexfutebol')->with('type', $time1,$time2); only shows $time2
– user100984