Skip to content

Commit 3d81c66

Browse files
author
Jonathan
committed
wording
1 parent 1ce74c4 commit 3d81c66

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Crud Generator Laravel 9 and 10 (your time saver)
22

3-
Crud Generator Laravel is a package designed to simplify the creation of a complete CRUD system in your Laravel project. It includes:
3+
Crud Generator Laravel is a package that you can integrate in your Laravel to create a REAL CRUD. It includes :
44

55
- **Controller** with all the code already written
66
- **Views** (index, create, edit, show)

src/Console/MakeApiCrud.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function handle()
125125
private function createRelationships($infos, $namingConvention)
126126
{
127127
$singularName = $namingConvention['singular_name'];
128-
if ($this->confirm('Do you want to create relationships between this model and an other one?'))
128+
if ($this->confirm('Do you want to create relationships between this model and another one?'))
129129
{
130130
$type = $this->choice(
131131
'Which type?',

src/Console/MakeCommentable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class MakeCommentable extends Command
2929
*
3030
* @var string
3131
*/
32-
protected $description = 'Add commentable fields to existing view';
32+
protected $description = 'Add commentable section to an existing view';
3333

3434
/**
3535
* Create a new command instance.
@@ -133,7 +133,7 @@ private function setNameModelRelationship($namingConvention)
133133
$type = "belongsTo";
134134
$infos = [];
135135
$singularName = $namingConvention['model_name'];
136-
$nameOtherModel = $this->ask('What is the name of the other model where you want to add commentable part? ex:Post');
136+
$nameOtherModel = $this->ask('What is the name of the other model to which you want to add a commentable section? ex:Post');
137137

138138
if($nameOtherModel === null)
139139
throw new ConsoleException('Please provide a model name');
@@ -154,9 +154,9 @@ private function setNameModelRelationship($namingConvention)
154154
private function askChangeView($namingConvention)
155155
{
156156
$allViews = $this->makeGlobalService->getAllViewsFiles();
157-
$this->error("Before to continue, please indicate this placeholder : {{comment_here}} where you want the form to be displayed");
157+
$this->error("Before continuing, please indicate the placeholder as follows: {{comment_here}}, where you want the form to be displayed.");
158158
$chosenView = $this->choice(
159-
'On which view do you want to add the comment part?',
159+
'On which view do you want to add the comment section?',
160160
$allViews,
161161
);
162162
$this->editCommentableView->editViewFile($chosenView, $namingConvention, $this->nameParentModel);

src/Console/MakeCrud.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function handle()
128128
private function createRelationships($infos, $namingConvention)
129129
{
130130
$singularName = $namingConvention['singular_name'];
131-
if ($this->confirm('Do you want to create relationships between this model and an other one?'))
131+
if ($this->confirm('Do you want to create relationships between this model and another one?'))
132132
{
133133
$type = $this->choice(
134134
'Which type?',

src/Console/MakeService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MakeService extends Command
2222
*
2323
* @var string
2424
*/
25-
protected $description = 'Create service file';
25+
protected $description = 'Make a service file';
2626

2727
/**
2828
* Create a new command instance.

src/Console/RemoveCrud.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private function deleteDirectory($namingConvention, $fileType, $force)
6666
{
6767
if(File::isDirectory($this->removeCrudService->pathsForFiles($namingConvention)[$fileType]))
6868
{
69-
if ($force || $this->confirm('Do you want delete all files in this '.$fileType.' directory '.$this->removeCrudService->pathsForFiles($namingConvention)[$fileType].' ? '."\n".implode(", \n",File::files($this->removeCrudService->pathsForFiles($namingConvention)[$fileType]))))
69+
if ($force || $this->confirm('Do you want to delete all files in this '.$fileType.' directory '.$this->removeCrudService->pathsForFiles($namingConvention)[$fileType].' ? '."\n".implode(", \n",File::files($this->removeCrudService->pathsForFiles($namingConvention)[$fileType]))))
7070
{
7171
if(File::deleteDirectory($this->removeCrudService->pathsForFiles($namingConvention)[$fileType]))
7272
$this->line("<info>".ucfirst($fileType)." deleted</info>");

tests/Console/MakeApiCrudTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function test_simple_crud_api()
2525
$arrayViewsExisting = array_map(fn($path) => basename($path), glob(resource_path('views/posts/').'*'));
2626
$this->assertCount(0, $arrayViewsExisting);
2727
$this->artisan('make:rest-api', ['crud_name'=>"post", "columns"=>"title, content:text"])
28-
->expectsConfirmation('Do you want to create relationships between this model and an other one?', 'no');
28+
->expectsConfirmation('Do you want to create relationships between this model and another one?', 'no');
2929

3030
//views
3131
$arrayViewsExisting = array_map(fn($path) => basename($path), glob(resource_path('views/posts/').'*'));

tests/Console/MakeCommentableTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ public function test_add_commentable_to_post()
2626
$arrayViewsExisting = array_map(fn($path) => basename($path), glob(resource_path('views/posts/').'*'));
2727
$this->assertCount(0, $arrayViewsExisting);
2828
$this->artisan('make:crud', ['crud_name'=>"post", "columns"=>"title, url"])
29-
->expectsConfirmation('Do you want to create relationships between this model and an other one?', 'no');
29+
->expectsConfirmation('Do you want to create relationships between this model and another one?', 'no');
3030

3131
$expectedViews = glob(resource_path("views".DIRECTORY_SEPARATOR."*".DIRECTORY_SEPARATOR."*.blade.php"));
3232
$this->artisan('make:commentable', ['commentable_name'=>"comment"])
33-
->expectsQuestion('What is the name of the other model where you want to add commentable part? ex:Post', 'post')
33+
->expectsQuestion('What is the name of the other model to which you want to add a commentable section? ex:Post', 'post')
3434
->expectsConfirmation('Do you confirm the creation of this relationship? "$this->belongsTo(\'App\Models\Post\')"', 'yes')
35-
->expectsChoice('On which view do you want to add the comment part?', $expectedViews[3], $expectedViews);
35+
->expectsChoice('On which view do you want to add the comment section?', $expectedViews[3], $expectedViews);
3636

3737
//controller
3838
$this->assertSame(preg_replace('/\s+/', '', File::get(__DIR__.DIRECTORY_SEPARATOR.'resultsOk/commentable/CommentsController.php')), preg_replace('/\s+/', '', File::get(app_path('Http/Controllers/CommentsController.php'))));

tests/Console/MakeCrudTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function test_simple_crud()
2525
$arrayViewsExisting = array_map(fn($path) => basename($path), glob(resource_path('views/posts/').'*'));
2626
$this->assertCount(0, $arrayViewsExisting);
2727
$this->artisan('make:crud', ['crud_name'=>"post", "columns"=>"title, url"])
28-
->expectsConfirmation('Do you want to create relationships between this model and an other one?', 'no');
28+
->expectsConfirmation('Do you want to create relationships between this model and another one?', 'no');
2929

3030
//views
3131
$arrayViewsCreated = array_map(fn($path) => basename($path), glob(resource_path('views/posts/').'*'));
@@ -60,7 +60,7 @@ public function _simple_crud_post_with_tags_and_comments()
6060
$arrayViewsExisting = array_map(fn($path) => basename($path), glob(resource_path('views/posts/').'*'));
6161
$this->assertCount(0, $arrayViewsExisting);
6262
$this->artisan('make:crud', ['crud_name'=>"post", "columns"=>"title, url"])
63-
->expectsConfirmation('Do you want to create relationships between this model and an other one?', 'yes')
63+
->expectsConfirmation('Do you want to create relationships between this model and another one?', 'yes')
6464
->expectsQuestion('Which type?', 'hasMany')
6565
->expectsQuestion('What is the name of the other model? ex:Post', 'Comment')
6666
->expectsConfirmation('Do you confirm the creation of this relationship? "$this->hasMany(\'App\Models\Comment\')"', 'yes')

0 commit comments

Comments
 (0)