Files
izyim-api/routes/api.php
T
2018-07-04 10:38:34 +08:00

73 lines
3.2 KiB
PHP

<?php
use Illuminate\Http\Request;
use App\Company;
/*
|--------------------------------------------------------------------------
| 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!
|
*/
/* Wshipping-order */
Route::get('/so', 'SoController@index');// get the list of the shipping order
Route::get('/so/{so_id}', 'SoController@showso');//get the shipping order
Route::post('/so', 'SoController@store');//store shipping order
Route::post('/so/{so_id}/cancelOrder', 'SoController@cancelOrder');//post the cancel order
Route::delete('/so/{so_id}', 'SoController@delete');// delete the shipping order
Route::put('/so/{so_id}', 'SoController@update');//update the shipping order
/* Warehouse-receive-note */
Route::get('/warehousearr','warehouseArrangementController@index');//view the wrn
Route::post('/warehousearr','warehouseArrangementController@store');//store the new wrn
Route::post('/warehousearr/warehouse_picture/{wa_id}','warehouseArrangementController@warehousearrpic');//upload warehousepicture picture
Route::post('/warehousearr/warehouse_item_picture/{wa_id}','warehouseArrangementController@warehouseitempic');//upload warehousepicture picture
Route::put('/warehousearr/{wa_id}','warehouseArrangementController@update');//update the wrn
Route::post('/decision','warehouseArrangementController@storedecision');//decision reject and request the wrn
Route::post('/decision/decisionitem','warehouseArrangementController@storedecisionitem');//decision item for reject and request
//Route::middleware('auth:api')->get('/user', function (Request $request) {
// return $request->user();
//});
Route::post('register', 'AuthController@register');
/* Authentication */
Route::post('login', 'AuthController@login');
Route::post('password/recover', 'AuthController@recover');
Route::post('password/reset', 'AuthController@reset');
Route::post('send-verification', 'AuthController@sendVerification');
Route::post('verify-phone', 'AuthController@verifyPhone');
Route::group(['middleware' => ['jwt.auth']], function() {
Route::get('logout', 'AuthController@logout');
Route::patch('user', 'AuthController@updateUser');
Route::get('test', function(Request $request){
return response()->json(['user'=> $request->user()]);
});
/*Delivery-Info in profile menu*/
Route::get('/deliveryinfo','DeliveryinfoController@index');
Route::get('/deliveryinfo/{com_id}','DeliveryinfoController@show');
Route::post('/deliveryinfo', 'DeliveryinfoController@store');
Route::put('/deliveryinfo/{com_id}', 'DeliveryinfoController@update');
Route::delete('/deliveryinfo/{com_id}', 'DeliveryinfoController@destroy');
/* Company */
Route::patch('/company', 'CompanyController@update'); //update company information
Route::post('/company/company_profile/', 'CompanyController@companyProfile');//upload company profile picture
Route::post('/company/reg_cert/', 'CompanyController@regCert'); //upload registration certificaate
});