Ejemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param CreateNoticeRequest $request
  * @param $group
  * @return Response
  */
 public function store(CreateNoticeRequest $request, $group)
 {
     if ($this->userRepository->isAMemberOf($group, \Auth::user())) {
         $this->dispatch($this->service->storeNoticeCommand($request, $group));
         $this->flash('You have successfully pined a new notice on your group notice board');
         return redirect()->back();
     }
     return redirect()->back()->withErrors('You are not a member of this groups, You can not Pin anything here.');
 }