mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
feat(#46): added support for request body in recipes
This commit is contained in:
parent
3673654df6
commit
e326ded933
7 changed files with 130 additions and 19 deletions
|
|
@ -22,6 +22,7 @@ class PluginFactory extends Factory
|
|||
'polling_url' => $this->faker->url(),
|
||||
'polling_verb' => $this->faker->randomElement(['get', 'post']),
|
||||
'polling_header' => null,
|
||||
'polling_body' => null,
|
||||
'render_markup' => null,
|
||||
'render_markup_view' => null,
|
||||
'detail_view_route' => null,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ return new class extends Migration
|
|||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table("plugins", function (Blueprint $table) {
|
||||
Schema::table('plugins', function (Blueprint $table) {
|
||||
$table->string('polling_url', 1024)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@ return new class extends Migration
|
|||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table("plugins", function (Blueprint $table) {
|
||||
Schema::table('plugins', function (Blueprint $table) {
|
||||
// old default string length value in Illuminate
|
||||
$table->string('polling_url', 255)->nullable()->change();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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('plugins', function (Blueprint $table) {
|
||||
$table->text('polling_body')->nullable()->after('polling_header');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('plugins', function (Blueprint $table) {
|
||||
$table->dropColumn('polling_body');
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue