2018-07-20 08:48:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
2018-07-20 15:07:16 +00:00
|
|
|
Route::group(['middleware' => ['web']], function () {
|
|
|
|
|
Route::prefix('customer')->group(function () {
|
2018-07-24 14:33:49 +00:00
|
|
|
|
2018-07-20 15:07:16 +00:00
|
|
|
// 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',
|
2018-07-24 14:33:49 +00:00
|
|
|
])->name('customer.session.index');
|
|
|
|
|
|
2018-07-27 13:37:56 +00:00
|
|
|
Route::post('login', 'Webkul\Customer\Http\Controllers\SessionController@create')->defaults('_config', [
|
2018-07-28 09:45:33 +00:00
|
|
|
'redirect' => 'customer.account.profile'
|
2018-07-24 14:33:49 +00:00
|
|
|
])->name('customer.session.create');
|
|
|
|
|
|
2018-07-20 15:07:16 +00:00
|
|
|
|
2018-07-24 14:33:49 +00:00
|
|
|
// 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
|
2018-07-24 14:33:49 +00:00
|
|
|
])->name('customer.register.index');
|
|
|
|
|
|
2018-07-27 13:37:56 +00:00
|
|
|
Route::post('register', 'Webkul\Customer\Http\Controllers\RegistrationController@create')->defaults('_config', [
|
2018-07-28 09:45:33 +00:00
|
|
|
'redirect' => 'customer.account.profile',
|
2018-07-24 14:33:49 +00:00
|
|
|
])->name('customer.register.create');
|
2018-07-20 15:07:16 +00:00
|
|
|
|
|
|
|
|
// Auth Routes
|
|
|
|
|
Route::group(['middleware' => ['customer']], function () {
|
2018-07-24 14:33:49 +00:00
|
|
|
|
|
|
|
|
//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', [
|
2018-07-20 15:07:16 +00:00
|
|
|
'redirect' => 'customer.session.index'
|
|
|
|
|
])->name('customer.session.destroy');
|
2018-07-24 14:33:49 +00:00
|
|
|
|
2018-07-28 09:45:33 +00:00
|
|
|
//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');
|
|
|
|
|
});
|
2018-07-20 15:07:16 +00:00
|
|
|
});
|
|
|
|
|
});
|
2018-07-20 08:48:42 +00:00
|
|
|
});
|