Preparing database migration

Laravel I18n package store the translations of your model in another database table.

First, let's take a look at the example below. In this example, we will create a Product resource which translatable into several languages.

Schema::create('products', function (Blueprint $table) {

Schema::create('product_translations', function (Blueprint $table) {
    $table->string('locale', 8);
    $table->string('description', 512)->nullable();

Edit this page on GitHub Updated at Wed, May 25, 2022