Please enable JS

Overview

Multilingual Web Application with Laravel: Model Translations

  0 reviews
9.00

There are a few ways of creating a multilingual database, which can be summarized to only two scenarios: build it yourself or use an existing package. Guess which one we will be doing in this tutorial :)

We will use this package dimsav/laravel-translatable for multilingual models. The readme in the package actually tells you how you need to write the migrations for your models for it to work correctly.

In the past, I have created my own way for multilingual models/database which worked, but after seeing this package and how it works, it just does not make any sense not to use it. It saves you so much time, as you will see in this tutorial, so let's get started.

We will create a model called Article which will have fields title and content. These fields need to be translatable to Croatian and English. This process will consist of us installing the package, writing migrations and setting up the model(s).

articles
- id INT UNSIGNED
- title VARCHAR
- content TEXT NULLABLE
- created_at DATETIME
- updated_at DATETIME
SAMPLE

SKU: multilingual-web-application-with-laravel-model-translations
Tags:
Author Mario Bašić
Words 1,025
Published At May 01, 2017
Last Updated October 06, 2017

No reviews yet.

Related Tutorials

Multilingual Web Application with Laravel: Authentication and Authorization

Laravel makes implementing authentication very simple. We will implement authentication in our existing application.

9.00

Multilingual Web Application with Laravel: Multilingual CRUD

In this tutorial, we will cover creating, updating, deleting and viewing all multilingual articles.

9.00

Laravel API 101: TEST

Laravel comes out-of-the-box with great testing suite built on PHPUnit. No API should be left untested.

25.00  19.99

Laravel API 101: CONSUME

We will create a new Laravel application which connects to the API that we have built in the previous lessons.

25.00  19.99

JSON Web Token Authentication for Lumen REBOOT

Learn how to implement JWT authentication in your Lumen application the proper way.

25.00  19.99

Laravel Forms & HTML

Everything you need to know about working with forms in Laravel. Based on Laravel Collective Forms & HTML package.

7.00
Instant Delivery
24/7 Customer Service
Payment Options
7 Days Refunds
Laravel
PHP
React.js
Vue.js
Composer
Nginx
Ubuntu
Linux
Windows
Codeception
MySQL
Lumen

Newsletter