本文整理汇总了PHP中app\Tag::lists方法的典型用法代码示例。如果您正苦于以下问题:PHP Tag::lists方法的具体用法?PHP Tag::lists怎么用?PHP Tag::lists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Tag
的用法示例。
在下文中一共展示了Tag::lists方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
// $tags = Tag::all();
$tags = Tag::lists('name', 'id');
$categories = Category::lists('title', 'id');
return view('admin.create', compact('tags', 'categories'));
}
示例2: edit
/**
* Show the form for creating a new Cruiseline.
*
* @return View
*/
public function edit($id)
{
$article = Article::find($id);
$tags = Tag::lists('name', 'id');
$users = User::orderBy('name', 'ASC')->lists('name', 'id');
return view('articles.edit', compact('article', 'tags', 'users'));
}
示例3: edit
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$instrumento = Instrumento::with('tags')->findOrFail($id);
$tags_instrumento = Instrumento::obtenerTags($instrumento->tags);
$tags = Tag::lists('nombre', 'id');
return view('instrumentos.edit', compact('instrumento', 'tags', 'tags_instrumento'));
}
示例4: edit
/**
* Hiển thị form cho việc cập nhật bài viết.
*
* @param Article $article
* @param ArticleRequest $request
* @return Response
*/
public function edit(Article $article)
{
// Lấy all Category & Tags để hiển thị
$categories = Category::lists('name', 'id');
$tags = Tag::lists('name', 'id')->toArray();
return view('admin.articles.edit', compact('article', 'categories', 'tags'));
}
示例5: edit
public function edit(Article $article)
{
$tags = Tag::lists("name", "id");
$published_at = Carbon::now();
$usert = $article->getTagListAttribute();
return view('articles.edit', compact('article', 'usert', 'published_at', 'tags'));
}
示例6: edit
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$tags = Tag::lists('name', 'id');
$post = Post::findOrFail($id);
$tags_exist = $post->tags->lists('id')->all();
return view("posts.edit", compact("post", 'tags', 'tags_exist'));
}
示例7: edit
public function edit(Post $post)
{
$data['tags'] = Tag::lists('name', 'id');
$data['pages'] = Page::where('status', 1)->lists('title', 'id');
$data['post'] = $post;
return view('post.update', $data);
}
示例8: edit
/**
* Show the form for editing the specified resource.
*
* @param Article $article
* @return \Illuminate\Http\Response
*/
public function edit(Article $article)
{
$twitter = Auth::user()->twitter_token()->first();
$hasTwitter = is_null($twitter) ? false : true;
$tags = Tag::lists('name', 'id');
return view('articles.edit', compact('article', 'tags', 'hasTwitter'));
}
示例9: edit
/**
* Edit the channel
* @param $id
*/
public function edit($id)
{
$channel = Channel::findOrFail($id);
$tags = Tag::lists('name', 'id')->all();
$tag_list = $channel->tags->lists('name', 'id');
return view('channels.edit', compact('channel', 'tags', 'tag_list'));
}
示例10: edit
public function edit($id)
{
$product = Product::find($id);
$categories = Category::lists('title', 'id');
$tags = Tag::lists('name', 'id');
return view('admin.edit', compact('product', 'tags', 'categories'));
}
示例11: edit
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$post = Post::findOrFail($id);
$categories = Category::lists('name', 'id');
$tags = Tag::lists('name', 'id');
return view('posts.edit', compact('post', 'categories', 'tags'));
}
示例12: edit
/**
* Show the form for editing the specified resource.
*
* @param int $id
*
* @return Response
*/
public function edit($id)
{
$article = Article::findOrFail($id);
$tags = \App\Tag::lists('name', 'id');
$categories = \App\Category::getLeveledCategories();
return view('admin.articles.edit', compact('article', 'tags', 'categories'));
}
示例13: create
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$comp = Post::lists('company_name', 'company_name');
$cat = Category::lists('name', 'name');
$tags = Tag::lists('name', 'name');
$stateList = \DB::table('statess')->lists('name', 'name');
return view('admin.pages.compose', compact('comp', 'stateList', 'tags', 'cat'));
}
示例14: edit
public function edit(Article $article)
{
//$article = Article::findOrFail($id);
//binded the wildcard article to this controller model
//so don't need to fetch article
$tags = \App\Tag::lists('name', 'id');
return view('articles.edit', compact('article', 'tags'));
}
示例15: edit
/**
* 修改文章页面
* @param $id
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function edit($id)
{
$article = Article::with('hasOneDetail')->findOrFail($id);
$article->detail = $article->hasOneDetail->detail;
// dd($article);
$tags = Tag::lists('name', 'id');
return view('articles.edit', compact('article', 'tags'));
}