Skip to content

Commit

Permalink
Payu Laravel
Browse files Browse the repository at this point in the history
Płatności PayU w Laravel. Jak utworzyć link do płatności za zamówienie w payu api.
  • Loading branch information
atomjoy committed Dec 12, 2022
1 parent d72dfb2 commit 67640c2
Showing 1 changed file with 2 additions and 42 deletions.
44 changes: 2 additions & 42 deletions database/migrations/2022_02_01_1_create_orders_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$table->id();
$table->uuid('uid')->unique()->index()->nullable(true);
$table->decimal('cost', 15, 2)->default(0.00);
$table->enum('payment_method', ['money', 'card', 'online'])->nullable()->default('money');
$table->enum('payment_method', ['money', 'card', 'online', 'pickup'])->nullable()->default('money');
$table->string('payment_gateway')->nullable(true);
$table->timestamps();
$table->softDeletes();
Expand All @@ -32,45 +32,5 @@ public function up()
public function down()
{
Schema::dropIfExists('orders');
}

/**
* Reverse the migrations.
*
* @return void
*/
public function downTable()
{
Schema::enableForeignKeyConstraints();
Schema::dropIfExists('users');
Schema::disableForeignKeyConstraints();

if (Schema::hasTable('users')) {
// The "users" table exists...
}

if (Schema::hasColumn('users', 'phone')) {
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('phone');
$table->dropColumn(['votes', 'avatar', 'location']);
$table->foreignUuid('user_id');
$table->string('name', 50)->nullable()->change();
$table->unique('email', 'unique_email');

$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->foreignId('user_id')->constrained('users')->onUpdate('cascade')->onDelete('cascade');
});
}
}

/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
}
};

0 comments on commit 67640c2

Please sign in to comment.