Skip to content

Commit 1a525f8

Browse files
Change command signature
1 parent 7623140 commit 1a525f8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ php artisan vendor:publish --tag=eloquent-filemaker-override-model
7777
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.
7878

7979
## Alternatively, use new make command
80-
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.
80+
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.
8181

8282
```shell
83-
php artisan make:fm-model Model
83+
php artisan make:model Model --filemaker
8484
```
8585

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

src/Commands/FMModelMakeCommand.php

+3-3
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)