/**
  * @param \HorseStories\Http\Requests\ConversationRequest $request
  * @return \Illuminate\Http\RedirectResponse
  */
 public function store(ConversationRequest $request)
 {
     $conversation = $this->conversationCreator->create($request->all());
     $this->messageCreator->create($conversation, Auth::user(), $request->all());
     Auth::user()->addConversation($conversation);
     $recipientId = $request->get('contact_id');
     $recipient = $this->users->findById($recipientId);
     $recipient->addConversation($conversation);
     return redirect()->route('conversation.index');
 }
예제 #2
0
 public function index()
 {
     $horses = $this->horses->search(Input::get('search'));
     $profiles = $this->users->search(Input::get('search'));
     return view('searches.index', compact('horses', 'profiles'));
 }
예제 #3
0
 /**
  * @param int $userId
  * @return \Illuminate\View\View
  */
 public function show($userId)
 {
     $user = $this->users->findById($userId);
     return view('users.profiles.show', compact('user'));
 }
예제 #4
0
 public function index()
 {
     $users = $this->users->all();
     return view('admin.users.index', compact('users'));
 }