PHP code example of davesweb / laravel-translatable
1. Go to this page and download the library: Download davesweb/laravel-translatable library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
davesweb / laravel-translatable example snippets
namespace App;
use Illuminate\Database\Eloquent\Model;
class Page extends Model
{
protected string $translation = App\DifferentPageTranslationName::class;
}
namespace App;
use Davesweb\LaravelTranslatable\Models\TranslationModel;
class PageTranslation extends TranslationModel
{
protected string $translates = App\SomeOtherModel::class;
}