Prepare a route to fetch all translations if needd

parent 0ace6969
<?php
namespace Modules\Translation\Http\Controllers\Api;
use Illuminate\Routing\Controller;
class AllTranslationController extends Controller
{
public function __invoke()
{
return response()->json([
'page' => trans('page::pages'),
'core' => trans('core::core')
]);
}
}
......@@ -17,4 +17,8 @@ $router->group(['prefix' => '/translation', 'middleware' => 'api.token'], functi
'uses' => 'TranslationController@revisions',
'as' => 'api.translation.translations.revisions',
]);
$router->get('/', [
'uses' => 'AllTranslationController',
'as' => 'api.translation.translations.all',
]);
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment