Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
workbiu-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gxx
workbiu-admin
Commits
d336a6af
Commit
d336a6af
authored
Nov 30, 2017
by
Mirzat
🤕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
database migration error
parent
a131f336
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
4 deletions
+16
-4
ScheduleServiceContract.php
app/Contracts/ScheduleServiceContract.php
+1
-0
TaskServiceContract.php
app/Contracts/TaskServiceContract.php
+1
-0
StatisticsController.php
app/Http/Controllers/StatisticsController.php
+2
-2
AdminService.php
app/Services/AdminService.php
+1
-1
ScheduleService.php
app/Services/ScheduleService.php
+5
-0
TaskService.php
app/Services/TaskService.php
+5
-0
2017_11_28_142018_entrust_setup_tables.php
...ase/migrations/2017_11_28_142018_entrust_setup_tables.php
+1
-1
No files found.
app/Contracts/ScheduleServiceContract.php
View file @
d336a6af
...
@@ -16,4 +16,5 @@ interface ScheduleServiceContract
...
@@ -16,4 +16,5 @@ interface ScheduleServiceContract
public
function
update
(
$id
,
$title
,
$content
,
$ends_at
,
$starts_at
);
public
function
update
(
$id
,
$title
,
$content
,
$ends_at
,
$starts_at
);
public
function
get
(
$id
);
public
function
get
(
$id
);
public
function
getAll
();
public
function
getAll
();
public
function
getCount
();
}
}
\ No newline at end of file
app/Contracts/TaskServiceContract.php
View file @
d336a6af
...
@@ -13,4 +13,5 @@ interface TaskServiceContract
...
@@ -13,4 +13,5 @@ interface TaskServiceContract
{
{
public
function
getAll
();
public
function
getAll
();
public
function
getTaskCount
();
}
}
\ No newline at end of file
app/Http/Controllers/StatisticsController.php
View file @
d336a6af
...
@@ -43,10 +43,10 @@ class StatisticsController extends Controller
...
@@ -43,10 +43,10 @@ class StatisticsController extends Controller
$projects
=
count
(
Project
::
all
());
$projects
=
count
(
Project
::
all
());
// 获取所有的任务
// 获取所有的任务
$tasks
=
$this
->
mTask
->
get
All
()
->
c
ount
();
$tasks
=
$this
->
mTask
->
get
TaskC
ount
();
// 获取所有日程
// 获取所有日程
$schedules
=
$this
->
mSchedule
->
get
All
()
->
c
ount
();
$schedules
=
$this
->
mSchedule
->
get
C
ount
();
return
view
(
'admin/index'
,
compact
(
'newUserCount'
,
'newProject'
,
'users'
,
'projects'
,
'tasks'
,
'schedules'
));
return
view
(
'admin/index'
,
compact
(
'newUserCount'
,
'newProject'
,
'users'
,
'projects'
,
'tasks'
,
'schedules'
));
...
...
app/Services/AdminService.php
View file @
d336a6af
...
@@ -50,7 +50,7 @@ class AdminService implements AdminServiceContract
...
@@ -50,7 +50,7 @@ class AdminService implements AdminServiceContract
$admin
->
password
=
bcrypt
(
$password
);
$admin
->
password
=
bcrypt
(
$password
);
$admin
->
save
();
$admin
->
save
();
if
(
$admin
)
{
if
(
$admin
)
{
if
(
count
(
$roles
)
>
0
)
{
if
(
$roles
!=
null
)
{
foreach
(
$roles
as
$role
)
{
foreach
(
$roles
as
$role
)
{
$adminRole
=
new
RoleAdmin
();
$adminRole
=
new
RoleAdmin
();
$adminRole
->
admin_id
=
$admin
->
id
;
$adminRole
->
admin_id
=
$admin
->
id
;
...
...
app/Services/ScheduleService.php
View file @
d336a6af
...
@@ -85,4 +85,9 @@ class ScheduleService implements ScheduleServiceContract
...
@@ -85,4 +85,9 @@ class ScheduleService implements ScheduleServiceContract
return
$schedules
;
return
$schedules
;
}
}
}
}
public
function
getCount
()
{
return
Schedule
::
count
();
}
}
}
\ No newline at end of file
app/Services/TaskService.php
View file @
d336a6af
...
@@ -23,4 +23,9 @@ class TaskService implements TaskServiceContract
...
@@ -23,4 +23,9 @@ class TaskService implements TaskServiceContract
}
}
return
$tasks
;
return
$tasks
;
}
}
public
function
getTaskCount
()
{
return
Task
::
count
();
}
}
}
\ No newline at end of file
database/migrations/2017_11_28_142018_entrust_setup_tables.php
View file @
d336a6af
...
@@ -29,7 +29,7 @@ class EntrustSetupTables extends Migration
...
@@ -29,7 +29,7 @@ class EntrustSetupTables extends Migration
->
onUpdate
(
'cascade'
)
->
onDelete
(
'cascade'
);
->
onUpdate
(
'cascade'
)
->
onDelete
(
'cascade'
);
$table
->
foreign
(
'role_id'
)
->
references
(
'id'
)
->
on
(
'roles'
)
$table
->
foreign
(
'role_id'
)
->
references
(
'id'
)
->
on
(
'roles'
)
->
onUpdate
(
'cascade'
)
->
onDelete
(
'cascade'
);
->
onUpdate
(
'cascade'
)
->
onDelete
(
'cascade'
);
$table
->
increments
(
"id"
);
$table
->
primary
([
'admin_id'
,
'role_id'
]);
$table
->
primary
([
'admin_id'
,
'role_id'
]);
});
});
...
...
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