I have This admin routes:
Route::group([
'namespace' => 'Auth',
], function () {
// Authentication Routes...
Route::get('login', 'LoginController@showLoginForm')->name('login_page');
Route::post('login', 'LoginController@login')->name('login');
Route::post('logout', 'LoginController@logout')->name('logout');
});
Route::group([
'middleware' => [
'auth:admin',
],
], function () {
// for all admins
Route::get('/', 'AdminController@index')->name('dashboard');
Route::get('home', 'AdminController@index')->name('dashboard');
Route::get('dashboard', 'AdminController@index')->name('dashboard');
// for administrator
// users
Route::group(['prefix' => 'users', 'as' => 'users.',], function () {
Route::get('all', 'UserController@index')->name('index');
Route::get('ajax', 'UserController@ajax')->name('ajax');
Route::get('create', 'UserController@create')->name('create');
Route::post('post', 'UserController@store')->name('store');
Route::get('show/{id}', 'UserController@show'); // ->where('id', '[0-9]+');
Route::post('change_status', 'UserController@change_status')->name('change_status');
Route::post('delete', 'UserController@delete')->name('delete');
});
});
I need to action form in create.blade
for store data:
<form method="POST" action="{{ route('users.store') }}">
but in action I see this error:
> "Route [users.store] not defined. (View: C:\xampp\htdocs\laravel-multiauth\resources\views\admin\pages\users\create.blade.php)"
name of router not defined in users group route. How do can i fix?