diff --git a/app/Models/Event.php b/app/Models/Event.php index 895736a..77d3822 100644 --- a/app/Models/Event.php +++ b/app/Models/Event.php @@ -19,6 +19,7 @@ class Event extends Model protected $fillable = [ 'title', 'location', + 'location_url', 'address', 'start_at', 'end_at', diff --git a/database/migrations/2023_05_09_003156_add_location_url_to_events.php b/database/migrations/2023_05_09_003156_add_location_url_to_events.php new file mode 100644 index 0000000..b8c5289 --- /dev/null +++ b/database/migrations/2023_05_09_003156_add_location_url_to_events.php @@ -0,0 +1,32 @@ +string('location_url')->default(''); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('events', function (Blueprint $table) { + $table->dropColumn('location_url'); + }); + } +}; diff --git a/resources/js/helpers/api.types.ts b/resources/js/helpers/api.types.ts index b3c0589..90b7ed3 100644 --- a/resources/js/helpers/api.types.ts +++ b/resources/js/helpers/api.types.ts @@ -9,6 +9,7 @@ export interface Event { end_at: string; publish_at: string; location: string; + location_url: string; address: string; status: string; registration_type: string; diff --git a/resources/js/views/Event.vue b/resources/js/views/Event.vue index 9f88696..d2d0053 100644 --- a/resources/js/views/Event.vue +++ b/resources/js/views/Event.vue @@ -99,11 +99,21 @@ name="location-outline" />Location
- {{ - event.location == "online" - ? "Online event" - : event.address - }} + Online event + {{ event.address }} + {{ event.address }}