PHP code example of dnj / laravel-localization

1. Go to this page and download the library: Download dnj/laravel-localization library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dnj / laravel-localization example snippets



namespace App\Models;

use dnj\Localization\Contracts\ITranslatableModel;
use dnj\Localization\Eloquent\HasTranslate;

class Product extends Model implements ITranslatableModel
{
	use HasTranslate;

	protected $table = "product";
}


namespace App\Models;

use dnj\Localization\Contracts\ITranslateModel;
use dnj\Localization\Eloquent\IsTranslate;

class ProductTranslate extends Model implements ITranslateModel
{
	use IsTranslate;

	protected $table = "product_translate";
}