Inheritance: extends Socieboy\Forum\Entities\Libs\BaseRepo
 /**
  * Display a conversation and replies
  *
  * @param $slug
  * @return \Illuminate\View\View
  */
 public function show($slug)
 {
     $conversation = $this->conversationRepo->findBySlug($slug);
     $topic = Topic::all();
     $replies = $conversation->replies()->orderBy('created_at', 'DESC')->paginate(4);
     return view('Forum::Conversations.show', compact('conversation', 'replies', 'topic'));
 }
Exemplo n.º 2
0
 /**
  * Execute the job.
  *
  * @param ConversationRepo $conversationRepo
  *
  * @return void
  */
 public function handle(ConversationRepo $conversationRepo)
 {
     $conversation = $conversationRepo->model();
     $conversation->fill($this->prepareDate());
     $conversation->save();
     if (config('forum.events.fire')) {
         event(new NewConversation($conversation));
     }
 }
Exemplo n.º 3
0
 /**
  * Search
  *
  * @param Request $request
  * @return \Illuminate\View\View
  */
 public function search(Request $request)
 {
     $conversations = $this->conversationRepo->search($request->all());
     return view('Forum::index', compact('conversations'));
 }
Exemplo n.º 4
0
 /**
  * Execute the job.
  *
  * @param ConversationRepo $conversationRepo
  *
  * @return void
  */
 public function handle(ConversationRepo $conversationRepo)
 {
     $conversation = $conversationRepo->findBySlug($this->slug);
     $conversation->update($this->prepareData());
 }
 /**
  * Execute the job.
  *
  * @param ConversationRepo $conversationRepo
  * @return void
  */
 public function handle(ConversationRepo $conversationRepo)
 {
     $conversation = $conversationRepo->model();
     $conversation->fill($this->prepareDate());
     $conversation->save();
 }
Exemplo n.º 6
0
 /**
  * Display the conversation edit form.
  *
  * @param string $slug
  *
  * @return \Illuminate\View\View
  */
 public function edit($slug)
 {
     $conversation = $this->conversationRepo->findBySlug($slug);
     return view('Forum::Conversations.edit')->with(compact('conversation'));
 }