Separated enum values are not working well
Closed this issue · 1 comments
muath-ye commented
- Laravel Version: #.#.#
- PHP Version: #.#.#
- Blueprint Version: #.#.#
- Platform: Mac | Windows | Linux
Issue:
I have this array of enum Invoice,Credit Note,Quote,Purchase Order,Receipt
and I can not pass it to the yaml file
draft.yaml:
models:
Bill:
currency: string nullable
type: enum:Invoice,Credit Note,Quote,Purchase Order,Receipt nullable
output on the migration
file
// ...
Schema::create('invoiceas', function (Blueprint $table) {
$table->id();
$table->string('currency')->nullable();
$table->enum('type', ["Invoice","Credit"])->nullable();
// ...
ghostwriter commented
Hey @muath-ye,
The cause of the issue is the space (
) in "Credit Note", another one in "Purchase Order".
If I remember correctly (#103 & #347), you can use single-quotes ('
) or double-quotes ("
) to achieve your goal.
type: enum:Invoice,'Credit Note',Quote,'Purchase Order',Receipt nullable
or
type: enum:Invoice,"Credit Note",Quote,"Purchase Order",Receipt nullable
let us know if that’s helpful/works, if not we'll take a closer look.