laravel/laravel — Issue #129: $variable not passed
Author: kevsmt
Created: 2011-10-30 08:25:47+00:00
State: open

Hi Taylor, provided w/ the title, here is the code:

#### routes/user.php

array('name' => 'login', 'do' => function()
{
return View::of_layout()
->nest('content', 'partials.login');
}),

'POST /user/login' => function()
{
if (Auth::attempt(Input::get('username'), Input::get('password')))
{
return Redirect::to_app_backoffice();
}

return Redirect::to_login()->with('error', 'The credentials you provided are invalid.');
}

);

#### composers.php

array('name' => 'layout', function($view)
{
// Stylesheets
Asset::add('app-css', 'css/app.css');

// Javascripts
Asset::add('jquery', 'js/jquery/jquery-min.js');
Asset::add('app', 'js/app.js', 'jquery');
Asset::add('b-dropdown', 'js/bootstrap/bootstrap-dropdown.js', 'jquery');
}),

);

#### views/partials/login.php

'form-inline well span0',
'data-app' => 'center',
'onkeypress' => 'return(function(e,o){if(e.keyCode===13)o.submit();})(event,this)'
)); ?>

get();?>

get(); ?>

Lang::line('user.login_placeholder_username')->get()
)); ?>
Lang::line('user.login_placeholder_password')->get()
)); ?>

`error` is not set. Any idea about this? btw, this is develop branch.

Kevin