1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Model |
5
|
|
|
*/ |
6
|
|
|
namespace Hokan22\LaravelTranslator\Models; |
7
|
|
|
|
8
|
|
|
use Carbon\Carbon; |
9
|
|
|
use Illuminate\Database\Eloquent\Model; |
10
|
|
|
use Illuminate\Database\Eloquent\Builder; |
11
|
|
|
|
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Class TranslationIdentifier |
15
|
|
|
* |
16
|
|
|
* @property int $id |
17
|
|
|
* @property string $identifier |
18
|
|
|
* @property array $parameters |
19
|
|
|
* @property string $group |
20
|
|
|
* @property string $page_name |
21
|
|
|
* @property string $description |
22
|
|
|
* @property Carbon $created_at |
23
|
|
|
* @property Carbon $updated_at |
24
|
|
|
* |
25
|
|
|
* @property-read Translations|null $text_translations |
26
|
|
|
* |
27
|
|
|
* @method static Builder|TranslationIdentifier create(array $attributes = []) |
28
|
|
|
* @method static Builder|TranslationIdentifier findOrFail($value) |
29
|
|
|
* @method static Builder|TranslationIdentifier whereBody($value) |
30
|
|
|
* @method static Builder|TranslationIdentifier whereCommentableId($value) |
31
|
|
|
* @method static Builder|TranslationIdentifier whereCommentableType($value) |
32
|
|
|
* @method static Builder|TranslationIdentifier whereCreatedAt($value) |
33
|
|
|
* @method static Builder|TranslationIdentifier whereId($value) |
34
|
|
|
* @method static Builder|TranslationIdentifier whereUpdatedAt($value) |
35
|
|
|
* @method static Builder|TranslationIdentifier whereUserId($value) |
36
|
|
|
* @method static Builder|TranslationIdentifier whereHas($relation, \Closure $callback = null, $operator = '>=', $count = 1) |
37
|
|
|
* @method static Builder|TranslationIdentifier where($column, $operator = null, $value = null, $boolean = 'and') |
38
|
|
|
* |
39
|
|
|
* @package Hokan22\LaravelTranslator\Models |
40
|
|
|
* @author Alexander Viertel <[email protected]> |
41
|
|
|
* @license http://opensource.org/licenses/MIT MIT |
42
|
|
|
*/ |
43
|
|
|
class TranslationIdentifier extends Model |
44
|
|
|
{ |
45
|
|
|
/** |
46
|
|
|
* @var array $fillable Database fields fillable by eloquent |
47
|
|
|
*/ |
48
|
|
|
protected $fillable = [ |
49
|
|
|
'identifier', |
50
|
|
|
'parameters', |
51
|
|
|
'group', |
52
|
|
|
'page_name', |
53
|
|
|
'description', |
54
|
|
|
]; |
55
|
|
|
|
56
|
|
|
protected $casts = [ |
57
|
|
|
'parameters' => 'array' |
58
|
|
|
]; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Returns the relation to the Translations |
62
|
|
|
* |
63
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany |
64
|
|
|
*/ |
65
|
|
|
public function translations() { |
66
|
|
|
return $this->hasMany(Translations::class); |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
} |