Skip to content

Commit

Permalink
update form block create docs
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilReinking committed Nov 24, 2023
1 parent e7463e8 commit e001e6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/Http/Controllers/Api/FormBlockController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use App\Models\FormBlock;
use Illuminate\Http\Request;
use Knuckles\Scribe\Attributes\Authenticated;
use Knuckles\Scribe\Attributes\BodyParam;
use Knuckles\Scribe\Attributes\Group;

#[Group('Form Blocks')]
Expand Down Expand Up @@ -42,7 +43,8 @@ public function index(Request $request, Form $form)
*
* This endpoint creates a new form block for the specified form.
*/
public function create(Form $form, Request $request)
#[BodyParam('type', description: 'The type of the form block. The form block type defaults to `none`.', required: false, enum: FormBlockType::class)]
public function create(Request $request, Form $form)
{
$this->authorize('update', $form);

Expand Down
4 changes: 2 additions & 2 deletions config/scribe.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,14 +362,14 @@
* If you would like the package to generate the same example values for parameters on each run,
* set this to any number (eg. 1234)
*/
'faker_seed' => 2023,
'faker_seed' => 1337,

/*
* With API resources and transformers, Scribe tries to generate example models to use in your API responses.
* By default, Scribe will try the model's factory, and if that fails, try fetching the first from the database.
* You can reorder or remove strategies here.
*/
'models_source' => ['factoryCreate', 'factoryMake', 'databaseFirst'],
'models_source' => ['factoryCreate', 'factoryMake'],
],

/**
Expand Down

0 comments on commit e001e6e

Please sign in to comment.