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