Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tag update #6

Merged
merged 16 commits into from
May 30, 2018
Prev Previous commit
Next Next commit
标签阶段性提交
  • Loading branch information
ro4 committed May 15, 2018
commit f120e889cb97ad51b35dbd799c137a103bb0ec0a
24 changes: 24 additions & 0 deletions app/Http/Controllers/TagController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Http\Controllers;


use App\Repositories\Document;
use App\Repositories\Tag;
use Illuminate\Http\Request;

class TagController extends Controller
{

public function store(Request $request)
{
$page = Document::findOrFail($request->input('p'));

$names = $request->input('tags');

$tags = Tag::whereIn('name', $names)->get();

dd($tags);
}

}
2 changes: 1 addition & 1 deletion resources/views/project/project.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
@endif
</h1>
</nav>
@include('components.tags')
@include('components.document-info')
<hr>
<div class="markdown-body wz-panel-limit {{ $type == 'markdown' ? 'wz-markdown-style-fix' : '' }}" id="markdown-body">
Expand Down Expand Up @@ -76,6 +75,7 @@
</ol>
</div>
@endif
@include('components.tags')
@else
<div class="wz-panel-breadcrumb">
<ol class="breadcrumb">
Expand Down
4 changes: 4 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,9 @@
// ajax获取操作历史
Route::get('/operations/recently', 'OperationLogController@recently')->name('operation-log:recently');


Route::group(['prefix' => 'tag', 'as' => 'tag:'], function () {

});
});
});