diff --git a/docs/.gitbook/assets/laravel-translatable (1).png b/docs/.gitbook/assets/laravel-translatable (1).png new file mode 100644 index 00000000..1268f85a Binary files /dev/null and b/docs/.gitbook/assets/laravel-translatable (1).png differ diff --git a/docs/.gitbook/assets/laravel-translatable (2).png b/docs/.gitbook/assets/laravel-translatable (2).png new file mode 100644 index 00000000..1268f85a Binary files /dev/null and b/docs/.gitbook/assets/laravel-translatable (2).png differ diff --git a/docs/README.md b/docs/README.md index f79199a7..512a8d07 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,7 +2,7 @@ [![Total Downloads](https://img.shields.io/packagist/dt/astrotomic/laravel-translatable.svg?style=flat-square)](https://packagist.org/packages/astrotomic/laravel-translatable) [![CircleCI](https://img.shields.io/circleci/build/github/Astrotomic/laravel-translatable/master.svg?label=CircleCI&style=flat-square)](https://circleci.com/gh/Astrotomic/laravel-translatable) [![StyleCI](https://styleci.io/repos/192333549/shield)](https://styleci.io/repos/192333549) [![ScrutinizerCI](https://img.shields.io/scrutinizer/quality/g/Astrotomic/laravel-translatable/master.svg?label=ScrutinizerCI&style=flat-square)](https://scrutinizer-ci.com/g/Astrotomic/laravel-translatable/) [![Code Climate](https://img.shields.io/codeclimate/maintainability/Astrotomic/laravel-translatable.svg?label=CodeClimate&style=flat-square)](https://codeclimate.com/github/Astrotomic/laravel-translatable) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/Astrotomic/laravel-translatable/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/Astrotomic/laravel-translatable/) [![Latest Version](http://img.shields.io/packagist/v/astrotomic/laravel-translatable.svg?style=flat-square)](https://packagist.org/packages/astrotomic/laravel-translatable) ![MIT License](https://img.shields.io/github/license/Astrotomic/laravel-translatable.svg?color=blue&style=flat-square) -![Laravel Translatable](.gitbook/assets/laravel-translatable.png) +![Laravel Translatable](.gitbook/assets/laravel-translatable%20%282%29.png) **If you want to store translations of your models into the database, this package is for you.** diff --git a/docs/changelog.md b/docs/changelog.md index 29eeec9a..dc0e9a1e 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,6 +1,22 @@ # Changelog -## v11.0.0 +## v11 + +### v11.1.1 + +* Add missing return type-hints - [\#16](https://github.com/Astrotomic/laravel-translatable/pull/16) + +### v11.1.0 + +* Add missing dependencies `illuminate/contracts` and `illuminate/database` - [\#9](https://github.com/Astrotomic/laravel-translatable/pull/9) +* Add `\Astrotomic\Translatable\Contracts\Translatable` interface +* Split `\Astrotomic\Translatable\Translatable` into multiple traits - but use them in the main one +* Add `translation` relationship - [\#3](https://github.com/Astrotomic/laravel-translatable/pull/3) +* Flag methods, not defined in interface as `@internal` +* Rename `getRelationKey()` to `getTranslationRelationKey()` to prevent conflicts - the original one is `@deprecated` and will be dropped in next major release +* Update the where translation scopes to unify them and remove duplicated code - [\#2](https://github.com/Astrotomic/laravel-translatable/pull/2) + +### v11.0.0 * Add PHP7 type-hints [\#557](https://github.com/dimsav/laravel-translatable/pull/557) * Move to `Astrotomic` [\#1](https://github.com/Astrotomic/laravel-translatable/pull/1) & [\#4](https://github.com/Astrotomic/laravel-translatable/pull/4) diff --git a/docs/usage/installation.md b/docs/usage/installation.md index f4750de8..0e4074de 100644 --- a/docs/usage/installation.md +++ b/docs/usage/installation.md @@ -60,9 +60,12 @@ The translatable model `Post` should [use the trait](http://www.sitepoint.com/us {% code-tabs %} {% code-tabs-item title="Post.php" %} ```php -class Post extends Eloquent +use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract; +use Astrotomic\Translatable\Translatable; + +class Post extends Model implements TranslatableContract { - use \Astrotomic\Translatable\Translatable; + use Translatable; public $translatedAttributes = ['title', 'content']; protected $fillable = ['author']; @@ -74,7 +77,7 @@ class Post extends Eloquent {% code-tabs %} {% code-tabs-item title="PostTranslation.php" %} ```php -class PostTranslation extends Eloquent +class PostTranslation extends Model { public $timestamps = false; protected $fillable = ['title', 'content'];