0
votes

I have a very mysterious problem. One of my routes is suddenly not working, all other routes works fine.

I get no errors, just an empty white blank page.

Even if i just return a string, it gives me nothing

public function create()
{
    return "Create";
}

The route:

Route::get('/start/user/create', array(
    'as' => 'user/create',
    'uses' => 'UserController@create'
));

The link:

<a class="btn btn-success pull-right" href="{{ URL::route('user/create') }}"> {{Lang::get('strings.create_customer')}}</a>

Im using MAMP and restarted the server and nothing helps.

EDIT: I tryed to make a completely new route, function in controller and view that simply just output a string. Its the same, it only gives me blank page.

EDIT 2: My application realy have som problem with the route start/user/create. If i change it to start/user/bullshit/create for example, everything works. So what can this be? Are there som kind of cache somewhere that always gives me blank pages with the route start/user/create. Its the only route that i have problems with.

2
Do you have error reporting on? It be some php error anywhere else that causes your blank pageDamien Pirsy
It gives no errors in php_error.logBullfinch
Show us your routes.php file.Marwelln
Wasn't it supposed to be 'as' => 'user.create'?lozadaOmr
It is up to you how to name your routes. I prefer name them as the actual route.Bullfinch

2 Answers

0
votes

I don't have the solution, but try this as route to rule out any problems with the controller class:

Route::get('/start/user/create', function()
{
    return 'This works!';
});

And then go directly to the url /start/user/create Hope it helps you in some way.

0
votes

The problem was not solved but by using resourceful routes instead its working. Code is cleaner too so i guess this is a better approach anyway.

Route::resource('start/user', 'UserController',
        array('names' => array('create' => 'user/create',
                                'index' => 'user/index',
                                'show'  => 'user/show',
                                'edit'  => 'user/edit',
                                'update'=> 'user/update',
                                'store' =>  'user/store',
                                'destroy'   =>'user/destroy')
));