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


PHP Tag::save方法代码示例

本文整理汇总了PHP中app\Tag::save方法的典型用法代码示例。如果您正苦于以下问题:PHP Tag::save方法的具体用法?PHP Tag::save怎么用?PHP Tag::save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Tag的用法示例。


在下文中一共展示了Tag::save方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: store

 public function store(TagRequest $request)
 {
     $tag = new Tag($request->all());
     $tag->save();
     Flash::success("Se ha agregado el tag " . $tag->name . " de manera exitosa!");
     return redirect()->route('admin.tags.index');
 }
开发者ID:gratereaux,项目名称:practicing-laravel,代码行数:7,代码来源:TagsController.php

示例2: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(TagRequest $request)
 {
     $tag = new Tag($request->all());
     $tag->save();
     Flash::success('El tag ' . $tag->name . ' ha sido creado con éxito.');
     return redirect()->route('admin.tags.index');
 }
开发者ID:JoseDguez,项目名称:laravel-project,代码行数:13,代码来源:TagsController.php

示例3: store

 public function store(TagRequest $request)
 {
     $tag = new Tag($request->all());
     $tag->save();
     Flash::success('El tag ' . $tag->nombre . ' se registro con exito!!');
     return redirect()->route('admin.tags.index');
 }
开发者ID:kyrayagami,项目名称:proyecto,代码行数:7,代码来源:TagsController.php

示例4: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $this->validate($request, ['new-post-tag' => 'required']);
     $tag = new Tag(array('title' => $request->get('new-post-tag'), 'slug' => str_slug($request->get('new-post-tag'))));
     $tag->save();
     return $this->getAllTags();
 }
开发者ID:leloulight,项目名称:RealMadrid,代码行数:13,代码来源:TagController.php

示例5: store_tag

 public function store_tag(Request $request)
 {
     $name = $request->name;
     $tag = new Tag();
     $tag->name = $name;
     $tag->save();
     return redirect('manage/producttags');
 }
开发者ID:Kaelcao,项目名称:colormev2,代码行数:8,代码来源:TagController.php

示例6: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $tag = new App\Tag();
     $tag->user_id = \Auth::user()->id;
     $tag->name = $request->name;
     $tag->save();
     return $tag;
 }
开发者ID:jorions,项目名称:bocket,代码行数:14,代码来源:TagsController.php

示例7: seedTags

 private function seedTags($faker)
 {
     foreach (range(0, 100) as $number) {
         $tag = new Tag();
         $tag->name = $faker->word;
         $tag->save();
     }
 }
开发者ID:alexbonavila,项目名称:taskAPI,代码行数:8,代码来源:DatabaseSeeder.php

示例8: seedTags

 private function seedTags($faker)
 {
     foreach (range(0, 100) as $item) {
         $tag = new Tag();
         $tag->title = $faker->word;
         //            $tag->prova = $faker->boolean();
         $tag->save();
     }
 }
开发者ID:Germangalia,项目名称:tasksAPI,代码行数:9,代码来源:DatabaseSeeder.php

示例9: seedTags

 private function seedTags($faker)
 {
     foreach (range(0, 100) as $number) {
         $tag = new Tag();
         $tag->title = $faker->word;
         // $tag->onoff =$faker->boolean;
         $tag->save();
     }
 }
开发者ID:OscarDuranX,项目名称:tasksAPI,代码行数:9,代码来源:DatabaseSeeder.php

示例10: store

 public function store(TagRequest $request)
 {
     //$this->createTags($request);
     $tag = new Tag();
     $tag->name = $request->input('name');
     $tag->save();
     \Session::flash('flash_message', 'Tag has been added!');
     return redirect('tags');
 }
开发者ID:chrisguo1,项目名称:To-Do-List,代码行数:9,代码来源:TagsController.php

示例11: store

 /**
  * Store the newly created tag in the database.
  *
  * @param TagCreateRequest $request
  * @return Response
  */
 public function store(TagCreateRequest $request)
 {
     $tag = new Tag();
     foreach (array_keys($this->fields) as $field) {
         $tag->{$field} = $request->get($field);
     }
     $tag->save();
     return redirect('/admin/tag')->withSuccess("The tag '{$tag->tag}' was created.");
 }
开发者ID:guduchango,项目名称:l5beauty,代码行数:15,代码来源:TagController.php

示例12: seedTags

 public function seedTags($faker)
 {
     foreach (range(0, 100) as $number) {
         $tag = new Tag();
         $tag->name = $faker->word;
         $tag->random_bool = $faker->boolean;
         $tag->save();
     }
 }
开发者ID:albertmayor,项目名称:tasksAPI,代码行数:9,代码来源:DatabaseSeeder.php

示例13: sendTags

 private function sendTags($faker)
 {
     foreach (range(0, 100) as $number) {
         $tag = new Tag();
         $tag->name = $faker->word;
         //$tag->tran = $faker->boolean;
         $tag->save();
     }
 }
开发者ID:pdavila13,项目名称:tasksAPI2,代码行数:9,代码来源:DatabaseSeeder.php

示例14: seedTags

 /**
  * @param Faker $faker
  */
 private function seedTags(Faker $faker)
 {
     foreach (range(0, 100) as $item) {
         $tag = new Tag();
         $tag->name = $faker->world;
         $tag->prova = $faker->boolean();
         $tag->save();
     }
 }
开发者ID:rogermelich,项目名称:tasksAPI,代码行数:12,代码来源:DatabaseSeeder.php

示例15: actionCreate

 public function actionCreate(Requests\CreateTagRequest $request)
 {
     // Create a new model instance and populate it with the request.
     $tag = new Tag($request->all());
     // Save tag in database.
     $tag->save();
     // Redirect with flash message.
     \Session::flash('flash_message', 'You have successfully created a tag.');
     return redirect('tags');
 }
开发者ID:JCStraw3,项目名称:photos,代码行数:10,代码来源:TagController.php


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