add landing pages for meetups

This commit is contained in:
Benjamin Takats
2023-01-14 20:35:54 +01:00
parent 8120b13bff
commit 2f00e34e10
55 changed files with 3161 additions and 17 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddReputationFieldOnUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->unsignedInteger('reputation')->default(0)->after('remember_token');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('reputation');
});
}
}

View File

@@ -0,0 +1,58 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateGamifyTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
// reputations table
Schema::create('reputations', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->mediumInteger('point', false)->default(0);
$table->integer('subject_id')->nullable();
$table->string('subject_type')->nullable();
$table->unsignedInteger('payee_id')->nullable();
$table->text('meta')->nullable();
$table->timestamps();
});
// badges table
Schema::create('badges', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('description')->nullable();
$table->string('icon')->nullable();
$table->tinyInteger('level')->default(config('gamify.badge_default_level', 1));
$table->timestamps();
});
// user_badges pivot
Schema::create('user_badges', function (Blueprint $table) {
$table->primary(['user_id', 'badge_id']);
$table->unsignedInteger('user_id');
$table->unsignedInteger('badge_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_badges');
Schema::dropIfExists('badges');
Schema::dropIfExists('reputations');
}
}

View File

@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
* @return void
*/
public function up()
{
Schema::table('meetups', function (Blueprint $table) {
$table->string('slug')
->nullable()
->after('id');
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
Schema::table('meetups', function (Blueprint $table) {
//
});
}
};