Skip to content

Instantly share code, notes, and snippets.

@yooouuri
Created February 21, 2017 13:58
Show Gist options
  • Select an option

  • Save yooouuri/b5c310cf9f52166b1dc95f69fd57a60d to your computer and use it in GitHub Desktop.

Select an option

Save yooouuri/b5c310cf9f52166b1dc95f69fd57a60d to your computer and use it in GitHub Desktop.
Routes
<?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::get('/', function () {
return view('welcome');
});
Route::group(['prefix' => 'account'], function () {
Route::name('my_account')
->get('/', 'AccountController@index');
Route::name('wish_list')
->get('wish_list', 'AccountController@wishList');
Route::get('wish/add/{name?}', 'AccountController@wish');
Route::name('history')
->get('history', 'AccountController@history');
Route::name('edit_profile')
->get('edit', 'AccountController@edit');
});
Route::name('login')
->get('/login', 'LoginController@index');
Route::post('/login', 'LoginController@login');
Route::get('/ajax/cart', 'CartController@cart');
Route::name('cart')
->get('/cart', 'CartController@index');
Route::name('product')
->get('/product/{name?}', 'ProductController@index');
Route::post('/product/{name?}/add', 'ProductController@add');
Route::post('/ajax/product/review', 'ProductController@review');
Route::name('checkout')
->get('/checkout', 'CartController@checkout');
Route::post('/checkout', 'CartController@order');
Route::get('/test', function () {
Session::flush();
});
Route::get('/logout', function () {
Auth::logout();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment