当前位置: 首页>>代码示例>>PHP>>正文


PHP Tag::lists方法代码示例

本文整理汇总了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'));
 }
开发者ID:bocanico,项目名称:ProjetStarWars,代码行数:12,代码来源:ProductController.php

示例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'));
 }
开发者ID:bigDeacs,项目名称:bunbury,代码行数:12,代码来源:ArticlesController.php

示例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'));
 }
开发者ID:dgutman85,项目名称:Cnea,代码行数:13,代码来源:InstrumentoController.php

示例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'));
 }
开发者ID:khanhpnk,项目名称:hocvet,代码行数:14,代码来源:ArticleController.php

示例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'));
 }
开发者ID:bordeau,项目名称:l5l,代码行数:7,代码来源:ArticleController.php

示例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'));
 }
开发者ID:essteffan,项目名称:laravel,代码行数:13,代码来源:PostController.php

示例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);
 }
开发者ID:Yuth-Set,项目名称:cms,代码行数:7,代码来源:PostController.php

示例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'));
 }
开发者ID:realnerdo,项目名称:blog,代码行数:13,代码来源:ArticlesController.php

示例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'));
 }
开发者ID:appliaison,项目名称:simplecms,代码行数:11,代码来源:ChannelController.php

示例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'));
 }
开发者ID:ivanovamarieta,项目名称:ProjetStarWars,代码行数:7,代码来源:ProductController.php

示例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'));
 }
开发者ID:alexisAvenel,项目名称:portfolioLaravel,代码行数:13,代码来源:PostsController.php

示例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'));
 }
开发者ID:kpaxer,项目名称:laravel-blog,代码行数:14,代码来源:ArticlesController.php

示例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'));
 }
开发者ID:samizares,项目名称:411jobs,代码行数:13,代码来源:AdminController.php

示例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'));
 }
开发者ID:bartolini69,项目名称:Laracast-Tutorials,代码行数:8,代码来源:ArticlesController.php

示例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'));
 }
开发者ID:xiaoterry,项目名称:blog,代码行数:13,代码来源:ArticleController.php


注:本文中的app\Tag::lists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。