Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-Server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李帅
2022-06-10 17:27:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0382f0fe1cd43223332bacacea3d358a5ade2db4
0382f0fe
1 parent
4a1a5f4e
1.优化脚本和readme
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
191 deletions
app/Admin/Controllers/AudioShowController.php
database/migrations/2021_12_30_082824_create_user_show_table.php
database/migrations/2021_12_30_083957_create_audio_show_table.php
database/migrations/2021_12_30_084831_create_video_show_table.php
app/Admin/Controllers/AudioShowController.php
deleted
100755 → 0
View file @
4a1a5f4
<?php
namespace
App\Admin\Controllers
;
use
App\Admin\Repositories\AudioShow
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Show
;
use
Dcat\Admin\Http\Controllers\AdminController
;
class
AudioShowController
extends
AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected
function
grid
()
{
return
Grid
::
make
(
new
AudioShow
(),
function
(
Grid
$grid
)
{
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'image_url'
);
$grid
->
column
(
'image_size'
);
$grid
->
column
(
'audio_url'
);
$grid
->
column
(
'audio_size'
);
$grid
->
column
(
'audio_time'
);
$grid
->
column
(
'created_at'
);
$grid
->
column
(
'updated_at'
)
->
sortable
();
$grid
->
filter
(
function
(
Grid\Filter
$filter
)
{
$filter
->
equal
(
'id'
);
});
});
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected
function
detail
(
$id
)
{
return
Show
::
make
(
$id
,
new
AudioShow
(),
function
(
Show
$show
)
{
$show
->
field
(
'id'
);
$show
->
field
(
'image_url'
);
$show
->
field
(
'image_size'
);
$show
->
field
(
'audio_url'
);
$show
->
field
(
'audio_size'
);
$show
->
field
(
'audio_time'
);
$show
->
field
(
'created_at'
);
$show
->
field
(
'updated_at'
);
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected
function
form
()
{
return
Form
::
make
(
new
AudioShow
(),
function
(
Form
$form
)
{
$form
->
display
(
'id'
);
$form
->
text
(
'image_url'
);
$form
->
text
(
'image_size'
);
$form
->
text
(
'audio_url'
);
$form
->
text
(
'audio_size'
);
$form
->
text
(
'audio_time'
);
$form
->
display
(
'created_at'
);
$form
->
display
(
'updated_at'
);
});
}
}
database/migrations/2021_12_30_082824_create_user_show_table.php
deleted
100755 → 0
View file @
4a1a5f4
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateUserShowTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'user_show'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedBigInteger
(
'user_id'
)
->
comment
(
'用户id'
);
$table
->
text
(
'content'
)
->
comment
(
'内容描述'
);
$table
->
unsignedTinyInteger
(
'type'
)
->
comment
(
'1=图文,2=视频'
);
$table
->
unsignedBigInteger
(
'pick_id'
)
->
index
()
->
comment
(
'引用的秀id'
);
$table
->
integer
(
'fav_num'
)
->
comment
(
'收藏数'
);
$table
->
integer
(
'view_num'
)
->
comment
(
'观看数'
);
$table
->
integer
(
'praise_num'
)
->
comment
(
'点赞数'
);
$table
->
integer
(
'comment_num'
)
->
comment
(
'评论数'
);
$table
->
unsignedBigInteger
(
'child_id'
)
->
comment
(
'图文/视频表id'
);
$table
->
unsignedTinyInteger
(
'state'
)
->
comment
(
'状态'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'user_show'
);
}
}
database/migrations/2021_12_30_083957_create_audio_show_table.php
deleted
100755 → 0
View file @
4a1a5f4
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateAudioShowTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'audio_show'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedBigInteger
(
'user_id'
)
->
index
()
->
comment
(
'用户id'
);
$table
->
string
(
'image_url'
)
->
default
(
''
)
->
comment
(
'图片地址'
);
$table
->
string
(
'image_size'
)
->
default
(
''
)
->
comment
(
'图片大小'
);
$table
->
string
(
'audio_url'
)
->
default
(
''
)
->
comment
(
'音频地址'
);
$table
->
string
(
'audio_size'
)
->
default
(
''
)
->
comment
(
'音频大小'
);
$table
->
string
(
'audio_time'
)
->
default
(
''
)
->
comment
(
'音频时长'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'audio_show'
);
}
}
database/migrations/2021_12_30_084831_create_video_show_table.php
deleted
100755 → 0
View file @
4a1a5f4
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateVideoShowTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'video_show'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedBigInteger
(
'user_id'
)
->
index
()
->
comment
(
'用户id'
);
$table
->
string
(
'video_url'
)
->
default
(
''
)
->
comment
(
'视频地址'
);
$table
->
string
(
'video_size'
)
->
default
(
''
)
->
comment
(
'视频大小'
);
$table
->
string
(
'video_time'
)
->
default
(
''
)
->
comment
(
'视频时长'
);
$table
->
unsignedTinyInteger
(
'is_horizontal'
)
->
comment
(
'1=横版,2=竖版'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'video_show'
);
}
}
Please
register
or
login
to post a comment