app/Http/Controllers/BinhLuanController.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(Request $request)
    {
        $binhluan = new binhLuan();
        $binhluan->username = $request->username;
        $binhluan->email = $request->email;
        $binhluan->noidung = $request->noidung;
        $binhluan->id_sanpham = $request->id_sanpham;
        $binhluan->adminreply = '';
        $binhluan->save();
        return back()
            ->with('success','Xin cám ơn! Bạn đã bình luận thành công, vui lòng đợi quản trị viên duyệt!');
    }
public function store ( Request $ request ) { $ binhluan = new binhLuan ( ) ; $ binhluan -> username = $ request -> username ; $ binhluan -> email = $ request -> email ; $ binhluan -> noidung = $ request -> noidung ; $ binhluan -> id_sanpham = $ request -> id_sanpham ; $ binhluan -> adminreply = '' ; $ binhluan -> save ( ) ; return back ( ) -> with ( 'success' , 'Xin cám ơn! Bạn đã bình luận thành công, vui lòng đợi quản trị viên duyệt!'); }
Store a newly created resource in storage.
Store a newly created resource in storage .
//