2017 © Pedro Peláez
 

library polyglot

Abstract model that eases the localization of Illuminate model.

image

anekdotes/polyglot

Abstract model that eases the localization of Illuminate model.

  • Thursday, November 17, 2016
  • by anekdotes
  • Repository
  • 3 Watchers
  • 0 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 4 % Grown

The README.md

Anekdotes Polyglot

Latest Stable Version Build Status codecov.io StyleCI License Total Downloads, (*1)

Abstract model that eases the localization of Illuminate model., (*2)

Installation

Install via composer into your project:, (*3)

composer require anekdotes/polyglot

Usage

Extends the model you wish to translate with the class, (*4)

class Test extends TranslatedModel

Add the desired translated columns to the polyglot array (locale has to be there), (*5)

protected $polyglot = ['locale', 'title', 'description', 'slug'];

Don't forget to also add the translated columns to the fillable array, (*6)

protected $fillable = ['rank', 'locale', 'title', 'description', 'slug'];

Make a new file preferably Lang.php and extends Illuminate Model, (*7)

class TestLang extends Model

Add the translated columns to the fillable array and set timestamps to false, (*8)

protected $fillable = ['locale', 'title', 'description', 'slug'];

public $timestamps = false;

The Versions

17/11 2016

dev-master

9999999-dev

Abstract model that eases the localization of Illuminate model.

  Sources   Download

MIT

The Requires

 

The Development Requires

model translated

14/10 2016

1.1.1

1.1.1.0

Abstract model that eases the localization of Illuminate model.

  Sources   Download

MIT

The Requires

 

The Development Requires

model translated

11/10 2016

1.1.0

1.1.0.0

Abstract model that eases the localization of Illuminate model.

  Sources   Download

MIT

The Requires

 

The Development Requires

model translated

11/10 2016

1.0.0

1.0.0.0

Abstract model that eases the localization of Illuminate model.

  Sources   Download

MIT

The Requires

 

The Development Requires

model translated