Files
izyim-api/routes/api.php
T
2018-05-15 15:31:07 +08:00

39 lines
1.4 KiB
PHP

<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
//route for the Warehouse-receive-note
Route::get('/warehousearr','WarehousearrController@index');//view the list of wrn
Route::get('/warehousearr/{wa_id}','warehousearrController@getwrn');//view the single wrn
Route::post('/warehousearr/{wa_id}','WarehousearrController@store');//store the new wrn
Route::put('/warehouserarr/{wa_id}','WarehousearrController@update');//update the wrn
Route::post('/decision-request','WarehousearrController@request');//decision request the wrn
Route::post('/decision-reject','WarehousearrController@reject');//reject the wrn
//Route::middleware('auth:api')->get('/user', function (Request $request) {
// return $request->user();
//});
Route::post('register', 'AuthController@register');
Route::post('login', 'AuthController@login');
Route::post('recover', 'AuthController@recover');
Route::group(['middleware' => ['jwt.auth']], function() {
Route::get('logout', 'AuthController@logout');
Route::get('test', function(){
return response()->json(['foo'=>'bar']);
});
});