|
@@ -3,6 +3,7 @@
|
|
namespace App\Admin\Controllers\CommunityNotice;
|
|
namespace App\Admin\Controllers\CommunityNotice;
|
|
|
|
|
|
use App\Models\CommunityNotice;
|
|
use App\Models\CommunityNotice;
|
|
|
|
+use App\Models\Organization;
|
|
use Encore\Admin\Auth\Database\Administrator;
|
|
use Encore\Admin\Auth\Database\Administrator;
|
|
use Encore\Admin\Controllers\AdminController;
|
|
use Encore\Admin\Controllers\AdminController;
|
|
use Encore\Admin\Facades\Admin;
|
|
use Encore\Admin\Facades\Admin;
|
|
@@ -28,6 +29,7 @@ class CommunityNotices extends AdminController
|
|
{
|
|
{
|
|
$grid = new Grid(new CommunityNotice());
|
|
$grid = new Grid(new CommunityNotice());
|
|
$grid->column('id', __('Id'))->sortable();
|
|
$grid->column('id', __('Id'))->sortable();
|
|
|
|
+ $grid->column('organization.name', __('发放社区'));
|
|
$grid->column('title', __('标题'));
|
|
$grid->column('title', __('标题'));
|
|
$grid->column('type', __('类型'))->using([1=>'社区通告']);
|
|
$grid->column('type', __('类型'))->using([1=>'社区通告']);
|
|
$grid->column('content', __('内容'))->limit(100,'...');
|
|
$grid->column('content', __('内容'))->limit(100,'...');
|
|
@@ -66,6 +68,7 @@ class CommunityNotices extends AdminController
|
|
{
|
|
{
|
|
$form = new Form(new CommunityNotice());
|
|
$form = new Form(new CommunityNotice());
|
|
$form->text('title', __('标题'));
|
|
$form->text('title', __('标题'));
|
|
|
|
+ $form->select('organization_id', __('发放的社区'))->options(Organization::all()->pluck('name','id'));
|
|
$form->select('type', __('类型'))->options([1=>'社区端通告']);
|
|
$form->select('type', __('类型'))->options([1=>'社区端通告']);
|
|
$form->editor('content', __('内容'));
|
|
$form->editor('content', __('内容'));
|
|
$form->submitted(function ($form){
|
|
$form->submitted(function ($form){
|