Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

After getting my Laravel Homestead up and running, I'm facing a new problem.

Even after some googling, I can't find a solution for setting up routes in Laravel Homestead.

Here is my routes.php (I created files like in the comments) :

<?php

// ===============================================
// STATIC PAGES ==================================
// ===============================================

// show a static view for the home page (app/views/home.blade.php)
Route::get('/', function()
{
    return View::make('home');
});

// about page (app/views/about.blade.php)
Route::get('about', function()
{
    return View::make('about');
});

// work page (app/views/work.blade.php)
Route::get('work', array('as' => 'work', function()
{
    return View::make('work');
}));
Route::get('users', function()
{
return View::make('users');
});

Thank you in advance for any piece of advice.

share|improve this question
    
Which page got error home or about or work or users? –  Jocker Mar 7 at 11:31
    
Home page is working fine, but the 3 others give the same "Not Found" error. –  Bolos Mar 7 at 11:32
    
Problems seems to come from View::make. When I change to View::share('data', [1, 2, 3]);, the page is showing up. –  Bolos Mar 7 at 14:18
    
Are you using Linux? Verify whether those view files you can't access have proper permissions by comparing them with home.blade.php –  Paweł Duda Mar 7 at 14:53
    
I'm on Mac OSX. I checked the files, they're all in 644. –  Bolos Mar 7 at 15:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.