Skip to content

Commit

Permalink
Merge branch 'release/0.1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
jasrys committed Aug 20, 2018
2 parents abd9dc2 + c5c14d3 commit 8f024ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jasrys/laravel-crud",
"version": "0.1.6",
"version": "0.1.7",
"description": "Laravel CRUD generator",
"require-dev": {
"orchestra/testbench": "^3.6",
Expand Down
4 changes: 2 additions & 2 deletions src/MakeCrud.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MakeCrud extends Command
*
* @var string
*/
protected $signature = 'crud:make {model} {--attributes=}';
protected $signature = 'make:crud {model} {--attributes=}';

/**
* The console command description.
Expand Down Expand Up @@ -254,7 +254,7 @@ protected function createFormView($modelName, $attributes)

$formattedAttributes = $attributes->map(function ($attribute) use ($modelName) {
return "\t" . '<div>' . PHP_EOL
. "\t\t" . '<label for="' . $attribute . '">' . ucfirst($attribute) . '</label>'
. "\t\t" . '<label for="' . $attribute . '">' . ucfirst(str_replace('_', ' ', $attribute)) . '</label>'
. PHP_EOL
. "\t\t" . '<input type="text" name="' . $attribute . '" class="form-control" value="{{ $' . strtolower($modelName) . "->{$attribute} ?? '' }}" . '" />'
. PHP_EOL . "\t" . '</div>'
Expand Down

0 comments on commit 8f024ff

Please sign in to comment.