Skip to content

Available options when you use make:crud command

MisterDebug edited this page Aug 20, 2023 · 2 revisions

To call make:crud you can do this :

php artisan make:crud nameOfYourCrud "column1:type, column2"

  • column is the name of your column sql (ID field is already present, don't add it)
  • type: This is optional and represents the SQL data type of your column. The default type is string. You have three choices available:
    • string: This corresponds to varchar in SQL and is converted into an input type of text in HTML.
    • text: This corresponds to text in SQL and is converted into a textarea in HTML.
    • integer: This corresponds to int in SQL and is converted into an input type of text in HTML.