Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui prefix #63

Open
znsstudio opened this issue Oct 16, 2016 · 7 comments
Open

ui prefix #63

znsstudio opened this issue Oct 16, 2016 · 7 comments

Comments

@znsstudio
Copy link

I could not find anything related --ui and code does not have anything related to it

@znsstudio
Copy link
Author

[Symfony\Component\Console\Exception\RuntimeException]
The "--ui" option does not exist.

@znsstudio
Copy link
Author

@sylviot r u aware of this issue?

@sylviot
Copy link
Contributor

sylviot commented Oct 17, 2016

@znsstudio

How are you try generating the scaffold?

The --ui="bs3" to use Stubs/views/bs3 !!

@robbielove
Copy link

robbielove commented Oct 30, 2016

I have tested this and found that there is an issue if the schema option is not used. I would tend to argue that there seems to be no logic to handle this situation - typically those who don't specify this option would be trying to avoid creating a migration, in which case the following happens:

$php artisan make:scaffold --ui="bs3" Test1

----------- scaffolding: Test1 -----------

  • Migration

  • Seed

    [ErrorException]
    Array to string conversion

However if the schema flag is used this is not an issue:

$php artisan make:scaffold --ui="bs3" --schema="test-field:string" Test

----------- scaffolding: Test -----------

  • Migration
    x Seed
  • Model
  • Controller

--- Views ---

  • create.blade.php
  • edit.blade.php
  • index.blade.php
  • show.blade.php
    x Layout (Skip)
    x Error (Skip)

----------- >DUMP AUTOLOAD< -----------
Don't forget to adjust: 'migrate' and 'routes'

@sylviot
Copy link
Contributor

sylviot commented Oct 30, 2016

So, create the model, migration and view without nothing?
or show a ask how "Confirm to create without schema?", is it better?

@robbielove
Copy link

Please show a prompt if there is no --schema or -s flag, to confirm that no migration will be created.
If --schema or -s is present but blank then create a blank migration - In my fork I have added default fields into the generator.

@sylviot
Copy link
Contributor

sylviot commented Oct 30, 2016

Thanks @robbielove, i'll implement a prompt to confirm that no attributes in migration/model/view will be created.

😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants