sarga/packages/Webkul/Customer/src/Http/routes.php

47 lines
2.1 KiB
PHP
Raw Normal View History

<?php
Route::group(['middleware' => ['web']], function () {
Route::prefix('customer')->group(function () {
// Login Routes
2018-07-27 13:37:56 +00:00
Route::get('login', 'Webkul\Customer\Http\Controllers\SessionController@show')->defaults('_config', [
'view' => 'shop::customers.login.index',
])->name('customer.session.index');
2018-07-27 13:37:56 +00:00
Route::post('login', 'Webkul\Customer\Http\Controllers\SessionController@create')->defaults('_config', [
'redirect' => 'customer.account.profile'
])->name('customer.session.create');
// Registration Routes
2018-07-27 13:37:56 +00:00
Route::get('register', 'Webkul\Customer\Http\Controllers\RegistrationController@show')->defaults('_config', [
'view' => 'shop::customers.signup.index' //hint path
])->name('customer.register.index');
2018-07-27 13:37:56 +00:00
Route::post('register', 'Webkul\Customer\Http\Controllers\RegistrationController@create')->defaults('_config', [
'redirect' => 'customer.account.profile',
])->name('customer.register.create');
// Auth Routes
Route::group(['middleware' => ['customer']], function () {
//route for logout which will be under the auth guard of the customer by default
2018-07-27 13:37:56 +00:00
Route::get('logout', 'Webkul\Customer\Http\Controllers\SessionController@destroy')->defaults('_config', [
'redirect' => 'customer.session.index'
])->name('customer.session.destroy');
//customer account
Route::prefix('account')->group(function () {
Route::get('profile', 'Webkul\Customer\Http\Controllers\CustomerController@profile')->defaults('_config', [
'view' => 'shop::customers.profile.home.index'
])->name('customer.account.profile');
//profile edit
Route::get('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@editProfile')->defaults('_config', [
'view' => 'shop::customers.profile.edit.index'
])->name('customer.profile.edit');
});
});
});
});