Merge pull request #2014 from jitendra-webkul/1.0
Transation models added for country and state
This commit is contained in:
commit
a66f556aca
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Contracts;
|
||||
|
||||
interface CountryStateTranslation
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Contracts;
|
||||
|
||||
interface CountryTranslation
|
||||
{
|
||||
}
|
||||
|
|
@ -2,10 +2,12 @@
|
|||
|
||||
namespace Webkul\Core\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Webkul\Core\Eloquent\TranslatableModel;
|
||||
use Webkul\Core\Contracts\Country as CountryContract;
|
||||
|
||||
class Country extends Model implements CountryContract
|
||||
class Country extends TranslatableModel implements CountryContract
|
||||
{
|
||||
public $translatedAttributes = ['name'];
|
||||
|
||||
public $timestamps = false;
|
||||
}
|
||||
|
|
@ -2,11 +2,13 @@
|
|||
|
||||
namespace Webkul\Core\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Webkul\Core\Eloquent\TranslatableModel;
|
||||
use Webkul\Core\Contracts\CountryState as CountryStateContract;
|
||||
|
||||
|
||||
class CountryState extends Model implements CountryStateContract
|
||||
class CountryState extends TranslatableModel implements CountryStateContract
|
||||
{
|
||||
public $translatedAttributes = ['name'];
|
||||
|
||||
public $timestamps = false;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Webkul\Core\Contracts\CountryStateTranslation as CountryStateTranslationContract;
|
||||
|
||||
class CountryStateTranslation extends Model implements CountryStateTranslationContract
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = ['name'];
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Models;
|
||||
|
||||
use Konekt\Concord\Proxies\ModelProxy;
|
||||
|
||||
class CountryStateTranslationProxy extends ModelProxy
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Webkul\Core\Contracts\CountryTranslation as CountryTranslationContract;
|
||||
|
||||
class CountryTranslation extends Model implements CountryTranslationContract
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = ['name'];
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Models;
|
||||
|
||||
use Konekt\Concord\Proxies\ModelProxy;
|
||||
|
||||
class CountryTranslationProxy extends ModelProxy
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -10,7 +10,9 @@ class ModuleServiceProvider extends BaseModuleServiceProvider
|
|||
\Webkul\Core\Models\Channel::class,
|
||||
\Webkul\Core\Models\CoreConfig::class,
|
||||
\Webkul\Core\Models\Country::class,
|
||||
\Webkul\Core\Models\CountryTranslation::class,
|
||||
\Webkul\Core\Models\CountryState::class,
|
||||
\Webkul\Core\Models\CountryStateTranslation::class,
|
||||
\Webkul\Core\Models\Currency::class,
|
||||
\Webkul\Core\Models\CurrencyExchangeRate::class,
|
||||
\Webkul\Core\Models\Locale::class,
|
||||
|
|
|
|||
Loading…
Reference in New Issue