Too few arguments to function PendingResourceRegistration::name(),1 passed in C:xampphtdocsproject outesweb.php on line 18 and exactly 2 expected



PHP Snippet 1:

Route::resource('siswa', 'SiswaController')->name('*', 'siswa')

PHP Snippet 2:

Route::get('siswa.index', 'SiswaController@index')->middleware('auth');

PHP Snippet 3:

Route::get('siswa', 'SiswaController@index')->name('siswa.index);
Route::post('siswa', 'SiswaController@store')->name('siswa.store);
Route::get('siswa/create', 'SiswaController@create')->name('siswa.create);
Route::post('siswa/{siswa}', 'SiswaController@update')->name('siswa.update);
Route::get('siswa/{siswa}', 'SiswaController@show')->name('siswa.show);
Route::delete('siswa/{siswa}', 'SiswaController@destroy')->name('siswa.destroy);
Route::get('siswa/{siswa}/edit', 'SiswaController@edit')->name('siswa.edit);

PHP Snippet 4:

Route::resource('siswa', 'SiswaController');

PHP Snippet 5:

Method          URI                         Route name              Action
GET|HEAD        siswa                       siswa.index             App\Http\Controllers\SiswaController@index
POST            siswa                       siswa.store             App\Http\Controllers\SiswaController@store
GET|HEAD        siswa/create                siswa.create            App\Http\Controllers\SiswaController@create
PUT|PATCH       siswa/{amenity}             siswa.update            App\Http\Controllers\SiswaController@udpate
GET|HEAD        siswa/{amenity}             siswa.show              App\Http\Controllers\SiswaController@show
DELETE          siswa/{amenity}             siswa.destroy           App\Http\Controllers\SiswaController@destroy
GET|HEAD        siswa/{amenity}/edit        siswa.edit              App\Http\Controllers\SiswaController@edit