forked from gekosale/Gekosale
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b107d0
commit c18d1d0
Showing
9 changed files
with
386 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
/* | ||
* Gekosale Open-Source E-Commerce Platform | ||
* | ||
* This file is part of the Gekosale package. | ||
* | ||
* (c) Adam Piotrowski <adam@gekosale.com> | ||
* | ||
* For the full copyright and license information, | ||
* please view the LICENSE file that was distributed with this source code. | ||
*/ | ||
namespace Gekosale\Core\Model; | ||
|
||
use Gekosale\Core\Model; | ||
|
||
/** | ||
* Class CategoryTranslation | ||
* | ||
* @package Gekosale\Core\Model | ||
* @author Adam Piotrowski <adam@gekosale.com> | ||
*/ | ||
class CategoryTranslation extends Model | ||
{ | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $table = 'category_translation'; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $timestamps = true; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
protected $softDelete = false; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
protected $fillable = ['category_id', 'language_id']; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
protected $translatable | ||
= [ | ||
'name', | ||
'slug', | ||
'short_description', | ||
'description', | ||
'meta_title', | ||
'meta_keywords', | ||
'meta_description' | ||
]; | ||
|
||
public function category() | ||
{ | ||
return $this->belongsTo('Gekosale\Core\Model\Category'); | ||
} | ||
|
||
/** | ||
* Relation with language table | ||
* | ||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||
*/ | ||
public function language() | ||
{ | ||
return $this->belongsTo('Gekosale\Core\Model\Language'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.