82 lines
1.5 KiB
PHP
82 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Tag;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Routing\Controllers\HasMiddleware;
|
|
|
|
class TagController extends Controller implements HasMiddleware
|
|
{
|
|
public static function middleware()
|
|
{
|
|
return [
|
|
'auth',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Display a listing of the resource.
|
|
*/
|
|
public function index()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Show the form for creating a new resource.
|
|
*/
|
|
public function create()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Store a newly created resource in storage.
|
|
*/
|
|
public function store(Request $request)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Display the specified resource.
|
|
*/
|
|
public function show(Request $request, Tag $tag)
|
|
{
|
|
$bookmarks = $tag->bookmarks()->where('user_id', $request->user()->id)->latest();
|
|
|
|
return view(
|
|
'tag.show', [
|
|
'tag' => $tag,
|
|
'tag_count' => $bookmarks->count(),
|
|
'bookmarks' => $bookmarks->paginate(20),
|
|
]
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Show the form for editing the specified resource.
|
|
*/
|
|
public function edit(Tag $tag)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Update the specified resource in storage.
|
|
*/
|
|
public function update(Request $request, Tag $tag)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Remove the specified resource from storage.
|
|
*/
|
|
public function destroy(Tag $tag)
|
|
{
|
|
//
|
|
}
|
|
}
|