Laravel v11.10.0 (PHP v8.3.7)
Laravel's localization features provide a convenient way to retrieve strings in various languages, allowing you to easily support multiple languages within your application.
- Clone project
git clone https://github.com/prom97/laravel_multi-language.git
- Install dependencies from composer.json and package.json (inside the project directory)
composer install
npm install
npm run dev
-
Create a new database and config your .env file (line 22 for reference)
-
⚠️ If the .env file does not exist:
cp .env.example .env
DB_CONNECTION=<your_db_connection>
DB_HOST=<your_host>
DB_PORT=<your_port>
DB_DATABASE=<your_database_name>
DB_USERNAME=<your_username>
DB_PASSWORD=<your_password>
- Run migrations to set your db tables structure
php artisan migrate
- Serve it
php artisan serve
- If you have any 500 Server error, try CTRL+C and then
php artisan cache:clear
composer dump-autoload