kambuku/app/Http/Controllers/ReviewsController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Requests\CreateNewReview $request)
    {
        dd(\Request::Input());
        comments::create([
           'name' => $request['name'],
            'email' => $request['email'],
            'comment' => $request['comment'],
            'classified_id' => $request['classified_id']
        ]);
        $name = $request['name'];
        $email = $request['email'];
        $comment = $request['comment'];
        $classified_details = classifieds::whereId($request['classified_id'])
            ->first()->toArray();
        $title = $classified_details['title'];
        $target = $classified_details['user_id'];
        Event::fire(new NewCommentEvent($name, $email, $comment, $title, $target));
        return redirect()->back()->with('comment','Comment Added Successfully');
    }
public function store ( Requests \ CreateNewReview $ request ) { comments :: create ( [ 'name' => $ request [ 'name' ] , 'email' => $ request [ 'email' ] , 'comment' => $ request [ 'comment' ] , 'classified_id' => $ request [ 'classified_id' ] ] ) ; $ name = $ request [ 'name' ] ; $ email = $ request [ 'email' ] ; $ comment = $ request [ 'comment' ] ; $ classified_details = classifieds :: whereId ( $ request [ 'classified_id' ] ) -> first ( ) -> toArray ( ) ; $ title = $ classified_details [ 'title' ] ; $ target = $ classified_details [ 'user_id' ] ; Event :: fire ( new NewCommentEvent ( $ name , $ email , $ comment , $ title , $ target ) ) ; return redirect ( ) -> back ( ) -> with ( 'comment' , 'Comment Added Successfully' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// // dd(\Request::Input());