This repository has been archived by the owner on Jun 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from dimsav/country-locales
Country locales
- Loading branch information
Showing
7 changed files
with
233 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php namespace Dimsav\Translatable\Test\Model; | ||
|
||
use Dimsav\Translatable\Translatable; | ||
use Illuminate\Database\Eloquent\Model as Eloquent; | ||
|
||
class Food extends Eloquent | ||
{ | ||
use Translatable; | ||
|
||
/** | ||
* Array with the fields translated in the Translation table. | ||
* | ||
* @var array | ||
*/ | ||
public $translatedAttributes = ['name']; | ||
|
||
/** | ||
* Set $translationModel if you want to overwrite the convention | ||
* for the name of the translation Model. Use full namespace if applied. | ||
* | ||
* The convention is to add "Translation" to the name of the class extending Translatable. | ||
* Example: Country => CountryTranslation | ||
*/ | ||
public $translationModel; | ||
|
||
/** | ||
* This is the foreign key used to define the translation relationship. | ||
* Set this if you want to overwrite the laravel default for foreign keys. | ||
* | ||
* @var | ||
*/ | ||
public $translationForeignKey; | ||
|
||
/** | ||
* Add your translated attributes here if you want | ||
* fill them with mass assignment. | ||
* | ||
* @var array | ||
*/ | ||
public $fillable = ['name']; | ||
|
||
/** | ||
* The database field being used to define the locale parameter in the translation model. | ||
* Defaults to 'locale'. | ||
* | ||
* @var string | ||
*/ | ||
public $localeKey; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php namespace Dimsav\Translatable\Test\Model; | ||
|
||
use Illuminate\Database\Eloquent\Model as Eloquent; | ||
|
||
class FoodTranslation extends Eloquent | ||
{ | ||
public $timestamps = false; | ||
} |