Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
428b9998
Commit
428b9998
authored
Nov 04, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding the entities
parent
5cd804f5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
0 deletions
+65
-0
Menu.php
Entities/Menu.php
+22
-0
MenuTranslation.php
Entities/MenuTranslation.php
+8
-0
Menuitem.php
Entities/Menuitem.php
+27
-0
MenuitemTranslation.php
Entities/MenuitemTranslation.php
+8
-0
No files found.
Entities/Menu.php
0 → 100644
View file @
428b9998
<?php
namespace
Modules\Menu\Entities
;
use
Dimsav\Translatable\Translatable
;
use
Illuminate\Database\Eloquent\Model
;
class
Menu
extends
Model
{
use
Translatable
;
protected
$fillable
=
[
'name'
,
'class'
,
'title'
,
'status'
,
];
public
$translatedAttributes
=
[
'title'
,
'status'
];
public
function
menuitems
()
{
return
$this
->
hasMany
(
'Modules\Menu\Entities\Menuitem'
)
->
orderBy
(
'position'
,
'asc'
);
}
}
Entities/MenuTranslation.php
0 → 100644
View file @
428b9998
<?php
namespace
Modules\Menu\Entities
;
use
Illuminate\Database\Eloquent\Model
;
class
MenuTranslation
extends
Model
{
protected
$fillable
=
[
'title'
,
'status'
];
}
Entities/Menuitem.php
0 → 100644
View file @
428b9998
<?php
namespace
Modules\Menu\Entities
;
use
Baum\Node
;
use
Dimsav\Translatable\Translatable
;
class
Menuitem
extends
Node
{
use
Translatable
;
public
$translatedAttributes
=
[
'title'
,
'uri'
,
'url'
,
'status'
];
protected
$fillable
=
[
'menu_id'
,
'page_id'
,
'position'
,
'target'
,
'module_name'
,
'title'
,
'uri'
,
'url'
,
'status'
];
public
function
menu
()
{
return
$this
->
belongsTo
(
'Modules\Menu\Entities\Menu'
);
}
}
Entities/MenuitemTranslation.php
0 → 100644
View file @
428b9998
<?php
namespace
Modules\Menu\Entities
;
use
Illuminate\Database\Eloquent\Model
;
class
MenuitemTranslation
extends
Model
{
public
$fillable
=
[
'title'
,
'uri'
,
'url'
,
'status'
];
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment