Support the ongoing development of Laravel.io →
Configuration Views Blade
Last updated 2 years ago.
0

do you have Route's for Home and About us?

can you paste and post your routes.php here? (http://bin.laravel.io)

Last updated 2 years ago.
0

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'));
    }
});
Last updated 2 years ago.
0

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

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

wiyono wiyono Joined 3 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.