File tree Expand file tree Collapse file tree 5 files changed +24
-5
lines changed Expand file tree Collapse file tree 5 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 22
33[](https://packagist.org/packages/astrotomic/laravel-translatable) [](https://circleci.com/gh/Astrotomic/laravel-translatable) [](https://styleci.io/repos/192333549) [](https://scrutinizer-ci.com/g/Astrotomic/laravel-translatable/) [](https://codeclimate.com/github/Astrotomic/laravel-translatable) [](https://scrutinizer-ci.com/g/Astrotomic/laravel-translatable/) [](https://packagist.org/packages/astrotomic/laravel-translatable) 
44
5- ![ Laravel Translatable] ( .gitbook/assets/laravel-translatable.png )
5+ ![ Laravel Translatable] ( .gitbook/assets/laravel-translatable%20%282%29 .png )
66
77** If you want to store translations of your models into the database, this package is for you.**
88
Original file line number Diff line number Diff line change 11# Changelog
22
3- ## v11.0.0
3+ ## v11
4+
5+ ### v11.1.1
6+
7+ * Add missing return type-hints - [ \# 16] ( https://github.com/Astrotomic/laravel-translatable/pull/16 )
8+
9+ ### v11.1.0
10+
11+ * Add missing dependencies ` illuminate/contracts ` and ` illuminate/database ` - [ \# 9] ( https://github.com/Astrotomic/laravel-translatable/pull/9 )
12+ * Add ` \Astrotomic\Translatable\Contracts\Translatable ` interface
13+ * Split ` \Astrotomic\Translatable\Translatable ` into multiple traits - but use them in the main one
14+ * Add ` translation ` relationship - [ \# 3] ( https://github.com/Astrotomic/laravel-translatable/pull/3 )
15+ * Flag methods, not defined in interface as ` @internal `
16+ * Rename ` getRelationKey() ` to ` getTranslationRelationKey() ` to prevent conflicts - the original one is ` @deprecated ` and will be dropped in next major release
17+ * Update the where translation scopes to unify them and remove duplicated code - [ \# 2] ( https://github.com/Astrotomic/laravel-translatable/pull/2 )
18+
19+ ### v11.0.0
420
521* Add PHP7 type-hints [ \# 557] ( https://github.com/dimsav/laravel-translatable/pull/557 )
622* Move to ` Astrotomic ` [ \# 1] ( https://github.com/Astrotomic/laravel-translatable/pull/1 ) & [ \# 4] ( https://github.com/Astrotomic/laravel-translatable/pull/4 )
Original file line number Diff line number Diff line change @@ -60,9 +60,12 @@ The translatable model `Post` should [use the trait](http://www.sitepoint.com/us
6060{% code-tabs %}
6161{% code-tabs-item title="Post.php" %}
6262``` php
63- class Post extends Eloquent
63+ use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract;
64+ use Astrotomic\Translatable\Translatable;
65+
66+ class Post extends Model implements TranslatableContract
6467{
65- use \Astrotomic\Translatable\ Translatable;
68+ use Translatable;
6669
6770 public $translatedAttributes = ['title', 'content'];
6871 protected $fillable = ['author'];
@@ -74,7 +77,7 @@ class Post extends Eloquent
7477{% code-tabs %}
7578{% code-tabs-item title="PostTranslation.php" %}
7679``` php
77- class PostTranslation extends Eloquent
80+ class PostTranslation extends Model
7881{
7982 public $timestamps = false;
8083 protected $fillable = ['title', 'content'];
You can’t perform that action at this time.
0 commit comments