Files
izyim-api/routes/api.php
jack c64c526d98 updated docker to fix faker image error
updated on user phone verification, create a company profile
removed company store function
updated company with user relationship
added company factory
moved company routes into authenticated routes
updated company test
renamed "verify" routes to "verify-phone"
2018-05-28 17:14:09 +08:00

36 lines
1.3 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!
|
*/
/* 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()]);
});
/* 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
});