我得到致命错误:Laravel 5功能名称必须是一个字符串错误
Function name must be a string
当尝试return $redirect()->to(blah blah blah
...
if($act=="ban"){
$ban_until = $request->input('ban_until');
if(Ragnarok::temporarilyBan($account_id,$banned_by,$ban_until,$ban_reason)){
return $redirect()->to('banlist');
}else{
return $redirect()->to('banlist')->withErrors('Failed to ban, database error');
}
}else if($act=="unban"){
if(Ragnarok::unBan($account_id,$banned_by,$ban_reason)){
return $redirect()->to('banlist');
}else{
return $redirect()->to('banlist')->withErrors('Failed to unban, database error');
}
}
任何人面对这样的错误?
尝试'重定向() - >到( 'banlist')'无'$' – haakym