/** * Run the migrations. * * @return void */ public function up() { Schema::table('tournaments', function (Blueprint $table) { $table->enum('type', Tournament::getAvailableTypes())->default(Tournament::TYPE_LEAGUE); $table->enum('membersType', Tournament::getAvailableMembersType())->default(Tournament::MEMBERS_TYPE_SINGLE); }); }
/** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return ['tournament.name' => 'required', 'tournament.description' => '', 'tournament.type' => 'in:' . join(',', Tournament::getAvailableTypes()), 'tournament.membersType' => 'in:' . join(',', Tournament::getAvailableMembersType())]; }