vendredi 23 juillet 2021

I am trying to store name of ordered meals for each user in order table, I am using Larvel

this is the order table

 $table->string('first_name');
        $table->string('last_name');
        $table->string('phone_number');    
        $table->string('meal_name');
        $table->Integer('quantity');

and this is the meal_user table which contains the order informations before confirming it by the user

  $table->double('quantity');
        $table->text('note')->nullble();
        $table->string('meal_size');
        $table->string('first_name')->nullable();
        $table->string('last_name')->nullable();
        $table->string('phone_number')->nullable(); 
        $table->bigInteger('location_id');
        $table->bigInteger('user_id')->nullable();
        $table->bigInteger('meal_id');

what I am trying to do is when the user confirm his orders it stores in the order table, but for each user has one record with all ordered meal names



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3eQGtPQ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire