AriasBros /
eloquent-locale
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Locale\Models; |
||
| 4 | |||
| 5 | use Illuminate\Database\Eloquent\Model; |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Class Localizable |
||
| 9 | * |
||
| 10 | * @since 1.0.0 |
||
| 11 | * @package Locale\Models |
||
| 12 | */ |
||
| 13 | abstract class Localizable extends Model |
||
| 14 | { |
||
| 15 | use \Locale\Traits\Localizable; |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 16 | |||
| 17 | /** |
||
| 18 | * The attributes that are localizables. |
||
| 19 | * |
||
| 20 | * @since 1.0.0 |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $localize = []; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The relations to eager load on every query. |
||
| 27 | * |
||
| 28 | * @since 1.0.0 |
||
| 29 | * @var array |
||
| 30 | */ |
||
| 31 | protected $with = ["locale"]; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Indicates if the locale should be timestamped. |
||
| 35 | * |
||
| 36 | * @since 1.0.0 |
||
| 37 | * @var bool |
||
| 38 | */ |
||
| 39 | protected $localeTimestamps = true; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Indicates that, if translation in current locale is missing, translation can be the fallback_locale of the app. |
||
| 43 | * |
||
| 44 | * @since 1.0.0 |
||
| 45 | * @var bool |
||
| 46 | */ |
||
| 47 | protected $fallbackLocale = true; |
||
| 48 | } |
||
| 49 |