-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.php
53 lines (43 loc) · 3.16 KB
/
web.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::redirect('/', '/products')->name('root');
Route::get('products', 'ProductsController@index')->name('products.index');
Auth::routes(['verify' => true]);
Route::group(['middleware' => ['auth', 'verified']], function() {
Route::get('user_addresses', 'UserAddressesController@index')->name('user_addresses.index');
Route::get('user_addresses/create', 'UserAddressesController@create')->name('user_addresses.create');
Route::post('user_addresses', 'UserAddressesController@store')->name('user_addresses.store');
Route::get('user_addresses/{user_address}', 'UserAddressesController@edit')->name('user_addresses.edit');
Route::put('user_addresses/{user_address}', 'UserAddressesController@update')->name('user_addresses.update');
Route::delete('user_addresses/{user_address}', 'UserAddressesController@destroy')->name('user_addresses.destroy');
Route::post('products/{product}/favorite', 'ProductsController@favor')->name('products.favor');
Route::delete('products/{product}/favorite', 'ProductsController@disfavor')->name('products.disfavor');
Route::get('products/favorites', 'ProductsController@favorites')->name('products.favorites');
Route::post('cart', 'CartController@add')->name('cart.add');
Route::get('cart', 'CartController@index')->name('cart.index');
Route::delete('cart/{sku}', 'CartController@remove')->name('cart.remove');
Route::post('orders', 'OrdersController@store')->name('orders.store');
Route::get('orders', 'OrdersController@index')->name('orders.index');
Route::get('orders/{order}', 'OrdersController@show')->name('orders.show');
Route::post('orders/{order}/received', 'OrdersController@received')->name('orders.received');
Route::get('orders/{order}/review', 'OrdersController@review')->name('orders.review.show');
Route::post('orders/{order}/review', 'OrdersController@sendReview')->name('orders.review.store');
Route::post('orders/{order}/apply_refund', 'OrdersController@applyRefund')->name('orders.apply_refund');
Route::get('payment/{order}/alipay', 'PaymentController@payByAlipay')->name('payment.alipay');
Route::get('payment/alipay/return', 'PaymentController@alipayReturn')->name('payment.alipay.return');
Route::get('payment/{order}/wechat', 'PaymentController@payByWechat')->name('payment.wechat');
Route::get('coupon_codes/{code}', 'CouponCodesController@show')->name('coupon_codes.show');
});
Route::post('payment/alipay/notify', 'PaymentController@alipayNotify')->name('payment.alipay.notify');
Route::post('payment/wechat/notify', 'PaymentController@wechatNotify')->name('payment.wechat.notify');
Route::post('payment/wechat/refund_notify', 'PaymentController@wechatRefundNotify')->name('payment.wechat.refund_notify');
Route::get('products/{product}', 'ProductsController@show')->name('products.show');