mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
btc-meetups updated
This commit is contained in:
@@ -9,6 +9,7 @@ use Illuminate\Http\Request;
|
|||||||
use Laravel\Nova\Fields\BelongsTo;
|
use Laravel\Nova\Fields\BelongsTo;
|
||||||
use Laravel\Nova\Fields\ID;
|
use Laravel\Nova\Fields\ID;
|
||||||
use Laravel\Nova\Fields\Markdown;
|
use Laravel\Nova\Fields\Markdown;
|
||||||
|
use Laravel\Nova\Fields\Select;
|
||||||
use Laravel\Nova\Fields\Text;
|
use Laravel\Nova\Fields\Text;
|
||||||
use Laravel\Nova\Http\Requests\NovaRequest;
|
use Laravel\Nova\Http\Requests\NovaRequest;
|
||||||
|
|
||||||
@@ -82,6 +83,18 @@ class Meetup extends Resource
|
|||||||
->showStatistics()
|
->showStatistics()
|
||||||
->setFileName(fn($originalFilename, $extension, $model) => md5($originalFilename).'.'.$extension),
|
->setFileName(fn($originalFilename, $extension, $model) => md5($originalFilename).'.'.$extension),
|
||||||
|
|
||||||
|
Select::make(__('Community'), 'community')
|
||||||
|
->options(
|
||||||
|
[
|
||||||
|
'einundzwanzig' => 'Einundzwanzig',
|
||||||
|
'bitcoin' => 'Bitcoin',
|
||||||
|
'satoshis_coffeeshop' => 'Satoshis Coffeeshop',
|
||||||
|
]
|
||||||
|
)
|
||||||
|
->rules('required', 'string')
|
||||||
|
->help(__('This is the community that the meetup belongs to. If a community is not listed, please contact the administrator.'))
|
||||||
|
->hideFromIndex(),
|
||||||
|
|
||||||
Text::make('Name')
|
Text::make('Name')
|
||||||
->rules('required', 'string')
|
->rules('required', 'string')
|
||||||
->creationRules('unique:meetups,name')
|
->creationRules('unique:meetups,name')
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?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('community')
|
||||||
|
->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('meetups', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -54,7 +54,9 @@ Route::middleware([])
|
|||||||
->with([
|
->with([
|
||||||
'city.country',
|
'city.country',
|
||||||
])
|
])
|
||||||
->whereHas('city', fn($query) => $query->whereNotNull('cities.simplified_geojson'))
|
->where('community', '=', 'einundzwanzig')
|
||||||
|
->whereHas('city',
|
||||||
|
fn($query) => $query->whereNotNull('cities.simplified_geojson'))
|
||||||
->get()
|
->get()
|
||||||
->map(fn($meetup) => [
|
->map(fn($meetup) => [
|
||||||
'id' => $meetup->slug,
|
'id' => $meetup->slug,
|
||||||
|
|||||||
Reference in New Issue
Block a user