當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。