cirelramos / languages
package set language to life of request
1.0.5
2023-01-03 20:13 UTC
Requires
- php: ^8.0
- illuminate/config: ^7.20|^8.19|^9.0
- illuminate/contracts: ^7.20|^8.19|^9.0
- illuminate/database: ^7.20|^8.19|^9.0
- illuminate/http: ^7.20|^8.19|^9.0
README
About
The languages
package to get header content-language
and set value to life of request .
Tutorial how create composer package
Installation
Require the cirelramos/languages
package in your composer.json
and update your dependencies:
composer require cirelramos/languages
Configuration
set provider
'providers' => [
// ...
Cirelramos\Languages\Providers\ServiceProvider::class,
],
The defaults are set in config/languages.php
. Publish the config to copy the file to your own config:
php artisan vendor:publish --provider="Cirelramos\Languages\Providers\ServiceProvider"
Note: this is necessary to yo can change default config
Usage
add provider in config/app.php
'api' => [
// .
// .
Cirelramos\Languages\Middlewares\LanguageMiddleware::class,
],
License
Released under the MIT License, see LICENSE.