Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.96 KB | None | 0 0
  1. Route::get('/', 'IndexController@home');
  2.  
  3. // To add a product
  4. Route::get('/product', 'ProductController@index');
  5. Route::get('/product/create', 'ProductController@create');
  6. Route::post('/product', 'ProductController@store');
  7. // To add a voucher bind to a certain product
  8. Route::get('/product/{id}', 'ProductController@show');
  9. Route::get('/product/{id}/add_voucher', 'ProductController@add_voucher');
  10. Route::post('/product/{id}/add_voucher', 'ProductController@associate_voucher');
  11. // To remove voucher bind from a certain product
  12. Route::get('/product/{id}/remove_voucher', 'ProductController@remove_voucher');
  13. Route::post('/product/{id}/remove_voucher', 'ProductController@remove_associated_voucher');
  14. // To buy a product
  15. Route::delete('/product/{id}', 'ProductController@delete');
  16.  
  17.  
  18.  
  19. // To create a voucher and associate it with a discount tier
  20. Route::get('/voucher', 'VoucherController@voucher');
  21. Route::post('/voucher', 'VoucherController@voucher_create');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement