vendredi 18 août 2017

How to Show user Order History in Laravel 5.4

i have 2 table of order's
Orders Table

Schema::create('orders', function (Blueprint $table) {
            $table->increments('id');
            $table->string('fname');
            $table->string('lname')->nullable();
            $table->string('address1');
            $table->string('address2')->nullable();
            $table->string('city');
            $table->string('region');
            $table->string('postcode');
            $table->string('country');
            $table->string('phone');
            $table->string('total');
            $table->string('paymentmode');
            $table->string('randomid');
            $table->integer('user_id')->unsigned();
            $table->foreign('user_id')->references('id')->on('users')
                        ->onDelete('restrict')
                        ->onUpdate('restrict');
            $table->timestamps();
        });

and productorders

Schema::create('productorders', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('qty');
            $table->integer('order_id')->unsigned();
            $table->foreign('order_id')->references('id')->on('orders')
                        ->onDelete('cascade')
                        ->onUpdate('restrict');
            $table->timestamps();
        });

order successfully completed but now i want to show order history ordered by user's

Thanks



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2icGFOD
via IFTTT

Aucun commentaire:

Enregistrer un commentaire