6
0
Fork 0

修改创建消息BUG

release
vine_liutk 2021-12-13 15:30:37 +08:00
parent a088378c84
commit 2678664079
2 changed files with 3 additions and 4 deletions

View File

@ -18,9 +18,8 @@ class MessageController extends AdminController
*/
protected function grid()
{
$builder = new Message();
return Grid::make($builder, function (Grid $grid) {
$grid->model()->where('user_id', 0);
return Grid::make(new Message(), function (Grid $grid) {
$grid->model()->where('user_id', '=', 0);
$grid->column('id')->sortable();
$grid->column('title');
$grid->column('content');

View File

@ -22,7 +22,7 @@ class Message extends Model
];
protected $fillable = [
'title', 'content', 'type', 'ext', 'jump_type', 'jump_link',
'title', 'content', 'type', 'ext', 'jump_type', 'jump_link', 'user_id',
];
public function logs()