mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
twitter_username added
This commit is contained in:
@@ -35,6 +35,7 @@ class Episode extends Resource
|
||||
$lecturer = \App\Models\Lecturer::updateOrCreate(['name' => $model->podcast->title], [
|
||||
'team_id' => 1,
|
||||
'active' => true,
|
||||
'website' => $model->podcast->link,
|
||||
]);
|
||||
$lecturer->addMediaFromUrl($model->podcast->data['image'])
|
||||
->toMediaCollection('avatar');
|
||||
|
||||
@@ -88,6 +88,13 @@ class Lecturer extends Resource
|
||||
Text::make('Name')
|
||||
->rules('required', 'string'),
|
||||
|
||||
Text::make('Twitter username', 'twitter_username')
|
||||
->help(__('Without @'))
|
||||
->rules('nullable', 'string'),
|
||||
|
||||
Text::make('Website', 'website')
|
||||
->rules('nullable', 'url'),
|
||||
|
||||
Markdown::make(__('Subtitle'), 'subtitle')
|
||||
->help(__('This is the subtitle on the landing page.')),
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('lecturers', function (Blueprint $table) {
|
||||
$table->string('twitter_username')
|
||||
->nullable();
|
||||
$table->string('website')
|
||||
->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('lecturers', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user