ruạṛ
<?php use Illuminate\Http\Request; // use Modules\User\Http\Controllers\Api; /* |-------------------------------------------------------------------------- | 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::prefix('v10')->group(function() { Route::post('register', 'UserController@register'); Route::post('login', 'UserController@authenticate'); //firebase authentication Route::post('firebase_auth', 'UserController@firebaseAuth'); Route::group(['middleware' => ['jwt.verify','loginCheck','api.localization','CheckApiKey']], function() { //UserControler Route::prefix('user')->group(function() { Route::get('me', 'UserController@getAuthenticatedUser'); Route::get('logout', 'UserController@logout'); Route::post('change-password', 'UserController@changePassword'); Route::post('update/{id}', 'UserController@updateUserInfo')->middleware('permissionCheck:users_read'); Route::get('user_details_by_id', 'UserController@userDetailsById'); Route::get('user_details_by_email', 'UserController@userDetailsByemail'); Route::post('set_password', 'UserController@setPassword'); Route::post('deactivate_account', 'UserController@deactivateAccount'); Route::get('test', 'UserController@test'); }); }); Route::group(['middleware' => ['api.localization', 'CheckApiKey']], function() { //HomeController Route::prefix('home')->group(function() { Route::get('/content', 'HomeController@homeContent'); }); //SettingsController Route::get('/settings', 'SettingsController@settings'); //ConfigController Route::get('/config', 'ConfigController@config'); //home page Route::get('/home_contents', 'HomeController@homeContents'); //post by Route::get('/latest_posts', 'PostController@latestPosts'); Route::get('/video_posts', 'PostController@videoPosts'); Route::get('/post_by_category/{id}', 'PostController@postByCategory'); Route::get('/post_by_sub_category/{id}', 'PostController@postBySubCategory'); Route::get('/post_by_tag/{slug}', 'PostController@postByTag'); Route::get('/post_by_author/{id}', 'PostController@postByAuthor'); Route::get('/post_by_date/{date}', 'PostController@postByDate'); //post details url Route::get('/detail/{id}', 'PostController@articleDetail'); Route::get('/postDetails/{slug}', 'PostController@postDetails'); }); });
cải xoăn