Skip to content

Commit cc40dd9

Browse files
Change command signature
1 parent 460b7b6 commit cc40dd9

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@ php artisan vendor:publish --tag=eloquent-filemaker-override-model
7575
This publish will create a `model.stub` that will be used by `php artisan make:model` to set up new models. You should use this on projects that will only have models backed by FileMaker.
7676

7777
## Alternatively, use new make command
78-
Alternatively, you can use the new `make:fm-model` command. All options available to Laravel's native `make:model` command are also available to `make:fm-model` command.
78+
Alternatively, you can use the default `make:model` command with a new `--filemaker` flag. All options available to Laravel's native `make:model` command are still available for use.
7979

8080
```shell
81-
php artisan make:fm-model Model
81+
php artisan make:model Model --filemaker
8282
```
8383

84+
Note: If the `--filemaker` flag is not used, the model will be created as a standard Laravel model.
85+
8486
# Usage
8587
With the package installed you can now have access to all the features of this package. There are a few different areas to configure.
8688

src/Commands/FMModelMakeCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class FMModelMakeCommand extends LaravelModelMakeCommand
99
{
10-
protected $name = 'make:fm-model';
10+
protected $name = 'make:model';
1111

1212
/**
1313
* The console command description.
@@ -32,7 +32,7 @@ public function getStub()
3232
throw new \RuntimeException('This model type is not yet supported by Eloquent FileMaker.');
3333
}
3434

35-
$stub = $this->resolveStubPath('/stubs/fm.model.stub');
35+
$stub = $this->resolveFMStubPath('/stubs/fm.model.stub');
3636
}
3737

3838
return $stub;
@@ -44,7 +44,7 @@ public function getStub()
4444
* @param string $stub
4545
* @return string
4646
*/
47-
protected function resolveStubPath($stub)
47+
protected function resolveFMStubPath($stub)
4848
{
4949
return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
5050
? $customPath

0 commit comments

Comments
 (0)