do you have Route's for Home and About us?
can you paste and post your routes.php here? (http://bin.laravel.io)
regarding your routes, this might be better
Route::get('gallery/{city}', function($city) {
$cities = array('berlin', 'new-york');
if(in_array($city, $cities)) {
return View::make('gallery' . $city);
} else {
return View::make('gallery.error', array('message' => 'City ' . $city . ' not found'));
}
});
Hallo Zenry,
thank you for your answer, i just change the menu from like this:
<li><a href="{{('/')}}">Home</a></li>
<li><a href="{{('gallery')}}">Gallery</a></li>
<li><a href="{{('gallery/berlin')}}">Berlin</a></li>
into like this and work perfect.
{{ HTML::link('/', 'Home')}}
{{ HTML::link('/gallery', 'Gallery')}}
{{ HTML::link('/gallery/berlin', 'Berlin')}}
The first menu i muss put base url in header then work.
My routers is like this:
Route::get('gallery', function() {
$title = "Gallery";
return View::make('seiten.gallery')
->with ('title', $title);
});
Route::get('gallery/berlin', function() {
$title = "Gallery - Berlin";
return View::make('seiten.berlin')
->with ('title', $title);
});
Thank you
Is that possible to use link like the first without base url, or put base url not in header? in router maybe?
Regards Wiyono
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community