-5

http://kristijanhusak.github.io/laravel-form-builder/overview/quick-start.html Laravel form builder Quick start

Route [song.store] not defined.

I want to know how to write routing This is my present

Route::resource('/songs', 'Account\Controller')
       ->except([ 'show']);
Qirel
  • 25,449
  • 7
  • 45
  • 62

2 Answers2

1

Your route is missing a name, you need to specify this so laravel can generate a URL for it.

Route::resource('/songs', 'Account\Controller')
    ->except([ 'show'])
    ->name('song');
atymic
  • 3,093
  • 1
  • 13
  • 26
0

Laravel Route::group's in order to achieve the ability to prefix route names.

Route::group(['prefix' => 'song', 'as' => 'song.'], function() {
    // Route::get('example', function() { return; })->name('example');
});

In order to then access this route, you must use its name.

route('song.example');

Consider giving your route a name, this should fix the issue.

Route::group(['prefix' => 'song', 'as' => 'song.'], function() {
    Route::resource('songs', 'Account\Controller')
        ->except(['show'])
        ->name('songs');
});

Which can then be called like:

route('song.songs');
Jaquarh
  • 6,493
  • 7
  • 34
  • 86