Merge branch 'asif/contact' of gitlab.com:CIEFWorldwideSdnBhd/izyim-api into asif/warehouses

# Conflicts:
#	app/Http/Controllers/CompanyController.php
#	package-lock.json
#	routes/api.php
This commit is contained in:
Jack Goh
2018-06-20 11:32:02 +08:00
16 changed files with 368 additions and 23251 deletions
+12 -9
View File
@@ -12,12 +12,6 @@ use App\Company;
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
//Route::middleware('auth:api')->get('/user', function (Request $request) {
// return $request->user();
//});
@@ -25,6 +19,8 @@ use App\Company;
Route::post('register', 'AuthController@register');
/* Authentication */
Route::post('login', 'AuthController@login');
//Route::post('recover', 'AuthController@recover');
//
//Route::group(['middleware' => ['jwt.auth']], function() {
// Route::get('logout', 'AuthController@logout');
@@ -40,14 +36,18 @@ Route :: get('/warehouse','WarehouseController@index');
Route :: delete('/contacts/{ff_id}','ContactController@destroy');
Route :: delete('/contacts/{contacts_id}','ContactController@destroy');
Route :: get('/contacts','ContactController@index');
Route :: post('/contacts','ContactController@store');
//Route :: post('/contacts','ContactController@store');
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');
@@ -72,6 +72,10 @@ Route::group(['middleware' => ['jwt.auth']], function() {
Route::post('/company', 'CompanyController@store'); //store company information
Route::put('/company/{company}', 'CompanyController@update'); //update company information
Route::get('/company/search/{company_name}', 'CompanyController@search');
/* Contacts */
Route::get('/company/search', 'CompanyController@search');
//Route::get('/company/search/{company_name}', 'CompanyController@search');//search company in contacts
Route::post('/contacts/{company_id}/request', 'ContactController@postApprove');
//Route::post('/company', 'CompanyController@uploadImage');
@@ -85,5 +89,4 @@ Route::get('/company/search/{company_name}', 'CompanyController@search');
// $company = Product::findOrFail($companyId);
// $company->update($request->all());
// return $company;
// });
// });