调整简历+文章增加外链
This commit is contained in:
@@ -25,7 +25,7 @@ class IndexController extends AdminController
|
||||
$filter->equal('categories.id', '所属分类')
|
||||
->select(Category::selectOptions(function ($model) {
|
||||
return $model->where('status', 1)
|
||||
->whereIn('type', [Category::TYPE_ARTICLE, Category::TYPE_SHOW,Category::TYPE_PERSON]);
|
||||
->whereIn('type', [Category::TYPE_ARTICLE, Category::TYPE_SHOW, Category::TYPE_PERSON]);
|
||||
}, '所有分类'));
|
||||
|
||||
});
|
||||
@@ -67,7 +67,7 @@ class IndexController extends AdminController
|
||||
$form->text('rank', '职称')->help('领导班子需要添加此数据');
|
||||
|
||||
$form->image('cover', '封面')
|
||||
->move('images/' . date('Y/m/d'))
|
||||
->move('images/'.date('Y/m/d'))
|
||||
->removable()
|
||||
->uniqueName();
|
||||
|
||||
@@ -80,6 +80,7 @@ class IndexController extends AdminController
|
||||
$form->datetime('created_at', '发布时间');
|
||||
|
||||
$form->switch('status', '状态')->states($states)->default(1);
|
||||
$form->url('url', '外链地址');
|
||||
|
||||
// $form->saved(function (Form $form) {
|
||||
// $category_ids = request()->category_ids;
|
||||
|
||||
@@ -66,6 +66,7 @@ class IndexController extends AdminController
|
||||
|
||||
$form->embeds('information', '基本信息', function ($form) {
|
||||
$form->text('duty', '职务');
|
||||
$form->text('tenure', '任期');
|
||||
$form->text('rank', '职称');
|
||||
$form->text('education', '学历');
|
||||
$form->text('mobile', '电话');
|
||||
@@ -75,10 +76,11 @@ class IndexController extends AdminController
|
||||
});
|
||||
|
||||
|
||||
$form->ueditor('direction', '主要科研项目')->required();
|
||||
$form->ueditor('direction', '研究方向')->rules('required', ['required' => '研究方向不能为空']);
|
||||
// $form->ueditor('content', '简历')->rules('required', ['required' => '简历不能为空']);
|
||||
$form->ueditor('outcome', '成果获奖情况')->required();
|
||||
$form->ueditor('project', '发表专著及论文选列')->required();
|
||||
$form->ueditor('outcome', '成果获奖情况')->rules('required', ['required' => '成果获奖情况不能为空']);
|
||||
$form->ueditor('thesis', '发表专著及论文选列')->rules('required', ['required' => '发表专著及论文选列不能为空']);
|
||||
$form->ueditor('project', '主要科研项目')->rules('required', ['required' => '主要科研项目不能为空']);
|
||||
$form->datetime('created_at', '发布时间');
|
||||
|
||||
$form->switch('status', '状态')->default(1);
|
||||
|
||||
@@ -11,11 +11,15 @@ class ArticleController extends Controller
|
||||
|
||||
/**
|
||||
* 显示分类
|
||||
*
|
||||
* @param \App\Models\Article $article
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View [type] [description]
|
||||
*/
|
||||
public function show(Article $article)
|
||||
{
|
||||
if ($article->url) {
|
||||
return redirect()->away($article->url);
|
||||
}
|
||||
$categories = $article->categories;
|
||||
$next = Article::where('id', '>', $article->id)
|
||||
->whereHas('categories', function ($q) use ($categories) {
|
||||
|
||||
@@ -74,6 +74,7 @@ class Resume extends Model
|
||||
{
|
||||
return [
|
||||
'duty' => '职务',
|
||||
'tenure' => '任期',
|
||||
'rank' => '职称',
|
||||
'education' => '学历',
|
||||
'mobile' => '电话',
|
||||
|
||||
@@ -18,9 +18,9 @@ class CreateResumesTable extends Migration
|
||||
$table->unsignedBigInteger('category_id')->index();
|
||||
$table->unsignedBigInteger('group_id')->index();
|
||||
$table->string('name');
|
||||
$table->string('cover');
|
||||
$table->string('cover')->nullable();
|
||||
$table->json('information')->comment('基本信息');
|
||||
$table->text('content')->comment('简历');
|
||||
$table->text('content')->nullable()->comment('简历');
|
||||
$table->string('direction')->comment('研究方向');
|
||||
$table->text('outcome')->comment('代表成果');
|
||||
$table->text('project')->comment('承担科研项目情况');
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
{{-- </div>--}}
|
||||
{{-- </div>--}}
|
||||
<div class="tdrcCont-label">
|
||||
<div class="tdrcCont-title">主要科研项目</div>
|
||||
<div class="tdrcCont-title">研究方向</div>
|
||||
<div class="tdrcCont-text">
|
||||
{{ $resume->direction }}
|
||||
{!! $resume->direction !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tdrcCont-label">
|
||||
@@ -57,6 +57,12 @@
|
||||
</div>
|
||||
<div class="tdrcCont-label">
|
||||
<div class="tdrcCont-title">发表专著及论文选列</div>
|
||||
<div class="tdrcCont-text">
|
||||
{!! $resume->thesis !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tdrcCont-label">
|
||||
<div class="tdrcCont-title">主要科研项目</div>
|
||||
<div class="tdrcCont-text">
|
||||
{!! $resume->project !!}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user