2019-11-16 20:37:33 +01:00
|
|
|
<?php
|
|
|
|
|
2019-11-30 18:19:13 +01:00
|
|
|
use Illuminate\Support\Facades\Route;
|
2019-11-16 20:37:33 +01:00
|
|
|
|
2019-11-30 18:19:13 +01:00
|
|
|
Route::group(['prefix' => 'user', 'middleware' => ['assign.guard:users']], function () {
|
|
|
|
Route::post('/register', 'UsersController@register');
|
|
|
|
Route::post('/login', 'UsersController@login');
|
|
|
|
Route::get('/me', 'UsersController@me');
|
2020-01-07 19:45:45 +01:00
|
|
|
Route::post('/save-recipe', 'UsersController@saveRecipe');
|
2019-11-16 20:37:33 +01:00
|
|
|
});
|
2019-12-04 12:49:41 +01:00
|
|
|
|
2019-12-05 10:25:36 +01:00
|
|
|
Route::prefix('product')->group(function () {
|
2019-12-15 15:45:22 +01:00
|
|
|
Route::post('/', 'ProductsController@add')->middleware(['jwt.auth']);
|
2019-12-05 10:25:36 +01:00
|
|
|
Route::get('/', 'ProductsController@index');
|
2019-12-04 12:49:41 +01:00
|
|
|
});
|
2019-12-15 15:45:22 +01:00
|
|
|
|
|
|
|
Route::prefix('recipe')->group(function () {
|
|
|
|
Route::post('/', 'RecipesController@add')->middleware(['jwt.auth']);
|
|
|
|
Route::get('/', 'RecipesController@index');
|
2020-01-07 20:38:23 +01:00
|
|
|
Route::get('/{id}', 'RecipesController@get');
|
2019-12-15 15:45:22 +01:00
|
|
|
});
|
2020-01-07 19:45:45 +01:00
|
|
|
|
|
|
|
Route::post('calculate', 'ProductsController@calculate');
|