Php 为什么我的刀片有未定义的变量-Laravel 4.2
这是我的Php 为什么我的刀片有未定义的变量-Laravel 4.2,php,laravel-4,laravel-blade,Php,Laravel 4,Laravel Blade,这是我的routes.php Route::get('registration/verify/{confirmation}', ['as'=>'verify', 'uses'=>'HomeController@verify']); Route::get('login', ['as'=>'login', 'uses'=>'HomeController@getLogin']); 在我的刀刃上是这个 然后在我的HomeController.php上,错误出现在哪里
routes.php
Route::get('registration/verify/{confirmation}', ['as'=>'verify', 'uses'=>'HomeController@verify']);
Route::get('login', ['as'=>'login', 'uses'=>'HomeController@getLogin']);
在我的刀刃上是这个
然后在我的HomeController.php
上,错误出现在哪里
public function verify($confirmation)
{
$user = User::where('activation_code', '=', $confirmation)->first();
return Redirect::route('login')
->withInput(['email' => $user->email])
->with('fuck', 'wtf');
}
我犯了这样的错误
未定义变量:fuck(视图:C:\ProgramFiles(x86)\Ampps\www\tridg\local\app\views\auth\login.blade.php)
我不知道我哪里错了,我很自信这是正确的
EDIT1:
我甚至试过这个
public function verify($confirmation)
{
$user = User::where('activation_code', '=', $confirmation)->first();
// $user->active = 1;
// $user->save();
return Redirect::route('login', ['fuck'=>'wtf'])
->withInput(['email' => $user->email]);
}
无论如何,答案是
{{Session::get('var_name')}
不是{{$var_name}}
可能选择了不同的变量名。