From 5160b0f05d914450305705f2a522366393be8cfd Mon Sep 17 00:00:00 2001 From: 3x1 Date: Mon, 5 Sep 2022 16:26:49 +0200 Subject: [PATCH] =?UTF-8?q?first=20commit=20=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Http/Controllers/.gitkeep | 0 Http/Middleware/.gitkeep | 0 Http/Middleware/Language.php | 18 -------- Http/Middleware/LanguageMiddleware.php | 30 ------------- Http/Requests/.gitkeep | 0 LICENSE.md | 9 ++++ README.md | 60 ++++++++++++++++++++++++++ Routes/api.php | 4 -- Routes/web.php | 12 ------ composer.json | 33 ++++++++++++-- 10 files changed, 98 insertions(+), 68 deletions(-) delete mode 100644 Http/Controllers/.gitkeep delete mode 100644 Http/Middleware/.gitkeep delete mode 100644 Http/Middleware/Language.php delete mode 100644 Http/Middleware/LanguageMiddleware.php delete mode 100644 Http/Requests/.gitkeep create mode 100644 LICENSE.md create mode 100644 README.md diff --git a/Http/Controllers/.gitkeep b/Http/Controllers/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Http/Middleware/.gitkeep b/Http/Middleware/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Http/Middleware/Language.php b/Http/Middleware/Language.php deleted file mode 100644 index 9586a74..0000000 --- a/Http/Middleware/Language.php +++ /dev/null @@ -1,18 +0,0 @@ -header('Language'), ['ar', 'en'])) { - app()->setLocale($request->header('Language')); - } else { - app()->setLocale('ar'); - } - return $next($request); - } -} diff --git a/Http/Middleware/LanguageMiddleware.php b/Http/Middleware/LanguageMiddleware.php deleted file mode 100644 index 5b4c331..0000000 --- a/Http/Middleware/LanguageMiddleware.php +++ /dev/null @@ -1,30 +0,0 @@ -user()) { - if (Cookie::get('lang')) { - app()->setLocale(Cookie::get('lang')); - } else { - app()->setLocale('en'); - } - } - return $next($request); - } -} diff --git a/Http/Requests/.gitkeep b/Http/Requests/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..780778d --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright 2022 info@3x1.io + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..b45db1c --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +# VILT Translations Module + +Database Base Translations Keys with Google Translations API Integration. + +## Install + +```bash +composer require queents/translations-module +``` +Add Module to `modules_statuses.json` if not exists + +```json +{ + "Translations": true +} +``` + +```bash +php artisan translations:install +``` + +Make a migration + +```bash +php artisan migrate +``` + +Publish Assets + +```bash +npm i & npm run build +``` + +OR + +```bash +yarn & yarn build +``` + + +## Support + +you can join our discord server to get support [VILT Admin](https://discord.gg/HUNYbgKDdx) + +## Docs + +look to the new docs of v4.00 on my website [Docs](https://vilt.3x1.io/docs/) + +## Changelog + +Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. + +## Credits + +- [Queen Tech Solutions](https://github.com/queents) + +## License + +The MIT License (MIT). Please see [License File](LICENSE.md) for more information. + diff --git a/Routes/api.php b/Routes/api.php index 34c321a..8529679 100644 --- a/Routes/api.php +++ b/Routes/api.php @@ -12,7 +12,3 @@ | is assigned the "api" middleware group. Enjoy building your API! | */ - -Route::middleware('auth:api')->get('/translations', function (Request $request) { - return $request->user(); -}); diff --git a/Routes/web.php b/Routes/web.php index 2e1ce7d..2e3d391 100644 --- a/Routes/web.php +++ b/Routes/web.php @@ -15,16 +15,4 @@ | */ -// Route::middleware(['web', 'auth:sanctum', 'verified'])->prefix('translations')->name('translations.')->group(function () { -// Route::get('/', [TranslationsController::class, 'index'])->name('index'); -// Route::post('/', [TranslationsController::class, 'store'])->name('store'); -// Route::post('{id}/update', [TranslationsController::class, 'update'])->name('update'); -// Route::delete('{id}/delete', [TranslationsController::class, 'destroy'])->name('destory'); -// Route::post('bulk', [TranslationsController::class, 'bulk'])->name('bulk'); -// Route::get('scan', [TranslationsController::class, 'scan'])->name('scan'); -// Route::get('export', [TranslationsController::class, 'export'])->name('export'); -// Route::post('import', [TranslationsController::class, 'import'])->name('import'); -// Route::post('auto', [TranslationsController::class, 'auto'])->name('auto'); -// }); - Route::post('translations/switch', [TranslationsResource::class, 'change'])->name('translations.switch'); diff --git a/composer.json b/composer.json index 5ee997a..e8e1d0c 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,37 @@ { - "name": "nwidart/translations", - "description": "", + "name": "queents/translations-module", + "description": "Database Base Translations Keys with Google Translations API Integration", + "type": "laravel-module", + "license": "MIT", + "keywords": [ + "laravel", + "VILT", + "base", + "resource", + "page", + "translation", + "translation GUI", + "translation database", + "google translations", + "admin panel", + "admin one", + "vuejs", + "ineriajs", + "tailwind.css" + ], + "homepage": "https://www.queentechsolutions.net", "authors": [ { - "name": "Nicolas Widart", - "email": "n.widart@gmail.com" + "name": "Fady Mondy", + "email": "info@3x1.io", + "role": "Senior Fullstack Developer" } ], + "require": { + "queents/vilt": "^1.0", + "spatie/laravel-translatable": "^6.0", + "spatie/laravel-translation-loader": "^2.7" + }, "extra": { "laravel": { "providers": [],