为什么在我通过身份验证后无法查看欢迎页面?
换句话说,如果我在登录后尝试查看欢迎页面,则会收到以下错误...
FatalErrorException 第63行: 最大功能嵌套级别为' 100'到达,流产!
这就是我所做的,我认为我在第4步中所做的是造成这个问题的原因。
移动默认路线...
routes.php文件
Route::get('/', function () {
return view('welcome');
});
进入...
routes.php文件
Route::get('/' , 'PagesController@welcome');
PublicController
class PagesController extends Controller
{
public function welcome()
{
return view('welcome');
}
}
知道为什么吗?
仅供参考 - 如果我将所有内容都恢复为默认值,我可以看到欢迎页面。
由于
答案 0 :(得分:1)
将此行添加到您的public / index.php文件中:
/**
* add the letter buttons to the screen
*/
public void addLetters()
{
int x = (this.getWidth()/2)-60;
int y = 300;
int btnSize =20;
int btnsAdded = 0;
for (Character c : game.getAlphabet())
{
this.setLayout(null);
JButton letter = new JButton(Character.toString(c).toUpperCase());
letter.setLayout(null);
letter.setSize(btnSize, btnSize);
letter.setLocation(x,y);
letter.setFont(new Font("Calibri",Font.PLAIN,10));
letter.setMargin(new Insets(0,0,0,0));
letter.setVisible(true);
this.add(letter);
char guess = Character.toLowerCase(c);
letter.addActionListener(new ActionListener()
{
@Override public void actionPerformed(ActionEvent e)
{
//actionPerformed code omitted because it is irrelevant
}
});
x += 25;
btnsAdded++;
if(btnsAdded == 13)
{
x=(this.getWidth()/2)-60;
y+=50;
}
}
}
答案 1 :(得分:1)
这是一个错字或您使用/
代替PagesController@welcome
处理PublicController@welcome
?