如何在Laravel 8中使用Form Builder

问题描述

我尝试在Laravel 8中使用以下软件包:https://github.com/kristijanhusak/laravel-form-builder

在文档中说,路线应如下所示:

Route::get('songs/create',[
    'uses' => 'SongsController@create','as' => 'song.create'
]);

Route::post('songs',[
    'uses' => 'SongsController@store','as' => 'song.store'
]);

这不适用于Laravel 8,因此我根据以下帖子更改了代码:https://stackoverflow.com/a/63808132/2192013

Route::get('songs/create',[
    SongsController::class,'create'
]);

Route::post('songs','store'
]);

但是现在当我去/ songs / create时,出现以下错误:

Symfony \ Component \ Routing \ Exception \ RouteNotFoundException

未定义路线[song.store]。

我如何使它在Laravel 8中运行,该软件包应支持它吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)