Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
杨昕
media-resource
Commits
be12296a
Commit
be12296a
authored
Jul 17, 2020
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code format
parent
57de4232
Pipeline
#9914
passed with stages
in 32 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
18 deletions
+7
-18
MediaCategoryModel.php
app/Model/MediaCategoryModel.php
+7
-1
UserModel.php
app/Model/UserModel.php
+0
-17
No files found.
app/Model/MediaCategoryModel.php
View file @
be12296a
...
@@ -44,7 +44,13 @@ class MediaCategoryModel extends Eloquent
...
@@ -44,7 +44,13 @@ class MediaCategoryModel extends Eloquent
*/
*/
public
static
function
catgListPage
(
$request
){
public
static
function
catgListPage
(
$request
){
try
{
try
{
$catgList
=
MediaCategoryModel
::
paginate
(
10
);
$where
=
[];
if
(
$request
->
name
){
$where
[
'name'
]
=
$request
->
name
;
}
$catgList
=
MediaCategoryModel
::
where
(
$where
)
->
paginate
(
10
);
}
catch
(
\Exception
$exception
){
}
catch
(
\Exception
$exception
){
throw
new
DatabaseException
(
"类别不存在"
);
throw
new
DatabaseException
(
"类别不存在"
);
...
...
app/Model/UserModel.php
View file @
be12296a
...
@@ -24,23 +24,6 @@ class UserModel extends Eloquent
...
@@ -24,23 +24,6 @@ class UserModel extends Eloquent
public
static
function
getUserList
(
$request
){
public
static
function
getUserList
(
$request
){
try
{
try
{
// $str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
//
// for ($i = 0;$i<50;$i++){
//
// $data = [
// 'name' => substr(str_shuffle($str),5,10),
// 'create_time' => date('Y-m-d H:i:s',time()),
// 'status' => 0,
// 'password' => md5(123456)
// ];
//
// DB::connection("mongodb")->collection("users")->insertGetId($data);
//
// }
// die;
$where
=
[];
$where
=
[];
if
(
$request
->
name
){
if
(
$request
->
name
){
...
...
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