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


PHP PostRequest::user方法代码示例

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


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

示例1: store

 public function store(PostRequest $request, TagRepository $tagRepository)
 {
     $inputs = array_merge($request->all(), ['user_id' => $request->user()->id]);
     $post = $this->postRepository->store($inputs);
     if (isset($inputs['tags'])) {
         $tagRepository->store($post, $inputs['tags']);
     }
     return redirect(route('post.index'));
 }
开发者ID:py1903,项目名称:My-Blog-Creator,代码行数:9,代码来源:PostController.php

示例2: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(PostRequest $request)
 {
     $post = new Post();
     $topic_id = $request->input('topic_id');
     $post->content = $request->input('content');
     $post->user_id = $request->user()->id;
     $post->topic_id = $topic_id;
     $post->save();
     return Redirect::action('TopicController@show', array('id' => $topic_id));
 }
开发者ID:prudywsh,项目名称:tpe,代码行数:16,代码来源:PostController.php

示例3: store

 public function store(PostRequest $request, PhotoGestion $photoGestion)
 {
     if ($photoGestion->save($request->file('photo'))) {
         $input = $request->all();
         $input['photo'] = $photoGestion->getPictureLink();
         $inputs = array_merge($input, ['user_id' => $request->user()->id]);
         /*return 'Le formulaire est bien rempli avec : 
         		nom = '.$inputs['user_id'].'
         		type = '.$inputs['type'].'
         		postPicture = '.$inputs['photo'].'
         		photo = '.$photoGestion->getPictureLink().'
         		etat = '.$inputs['etat']; */
         $posts = $this->postRepository->store($inputs);
         //$posts['photo'] = $photoGestion->getPictureLink();
         return redirect(route('post.index'));
     }
     //$inputs = array_merge($request->all(), ['user_id' => $request->user()->id]);
     //$this->postRepository->store($inputs);
     //return redirect(route('post.index'));
 }
开发者ID:kondipakamey,项目名称:atofa,代码行数:20,代码来源:PostController.php

示例4: store

 public function store(PostRequest $request)
 {
     $inputs = array_merge($request->all(), ['user_id' => $request->user()->id]);
     $this->postRepository->store($inputs);
     return redirect(route('post.index'));
 }
开发者ID:focuslife,项目名称:v0.1,代码行数:6,代码来源:PostController.php

示例5: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  App\Http\Requests\PostRequest $request
  * @return Response
  */
 public function store(PostRequest $request)
 {
     $this->blog_gestion->store($request->all(), $request->user()->id);
     return redirect('blog')->with('ok', trans('back/blog.stored'));
 }
开发者ID:rgwybb,项目名称:laravel5-example,代码行数:11,代码来源:BlogController.php

示例6: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  App\Http\Requests\PostRequest $request
  * @return Response
  */
 public function store(PostRequest $request)
 {
     $this->blog_gestion->store($request->all(), $request->user()->id);
     return redirect('blog')->with('ok', '≈да добавлена');
 }
开发者ID:lvip,项目名称:Petfood,代码行数:11,代码来源:BlogController.php

示例7: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  App\Http\Requests\PostRequest $request
  * @return Response
  */
 public function store(PostRequest $request)
 {
     $this->blog_control->store($request->all(), $request->user()->id);
     return redirect('kadmin/articles')->with('ok', trans('kadmin.articles.stored'));
 }
开发者ID:pumi11,项目名称:astrologonew,代码行数:11,代码来源:ArticlesController.php


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