Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Schema::create('products', function (Blueprint $table) {
- $table->increments('id');
- $table->string('name');
- $table->float('trade_price', 8, 2);
- $table->float('sell_price', 8, 2);
- $table->integer('quantity');
- $table->integer('shop_id')->unsigned();
- $table->foreign('shop_id')->references('id')->on('shops');
- $table->integer('category_id')->unsigned();
- $table->foreign('category_id')->references('id')->on('categories');
- $table->timestamps();
- });
- Schema::create('shops', function (Blueprint $table) {
- $table->increments('id');
- $table->string('name');
- $table->string('address');
- $table->timestamps();
- });
Advertisement
Add Comment
Please, Sign In to add comment