added open_at for events
This commit is contained in:
@@ -23,7 +23,7 @@ class EventRequest extends BaseRequest
|
||||
'end_at' => 'date|after:start_date',
|
||||
'publish_at' => 'date|nullable',
|
||||
'status' => [
|
||||
Rule::in(['draft', 'soon', 'open', 'closed', 'cancelled']),
|
||||
Rule::in(['draft', 'soon', 'open', 'closed', 'cancelled', 'scheduled']),
|
||||
],
|
||||
'registration_type' => [
|
||||
Rule::in(['none', 'email', 'link', 'message']),
|
||||
|
||||
@@ -33,6 +33,7 @@ class Event extends Model
|
||||
'content',
|
||||
'price',
|
||||
'ages',
|
||||
'open_at',
|
||||
];
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('events', function (Blueprint $table) {
|
||||
$table->timestamp('open_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('events', function (Blueprint $table) {
|
||||
$table->dropColumn('open_at');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -50,6 +50,7 @@
|
||||
draft: 'Draft',
|
||||
soon: 'Opening Soon',
|
||||
open: 'Open',
|
||||
scheduled: 'Scheduled',
|
||||
closed: 'Closed',
|
||||
cancelled: 'Cancelled',
|
||||
}" />
|
||||
|
||||
Reference in New Issue
Block a user