@@ -145,6 +145,10 @@ |
||
145 | 145 | { |
146 | 146 | return $rootNamespace.'\Http\Controllers\API'; |
147 | 147 | } |
148 | + |
|
149 | + /** |
|
150 | + * @param string $rootNamespace |
|
151 | + */ |
|
148 | 152 | protected function getRepoNamespace($rootNamespace) { |
149 | 153 | return $rootNamespace.'Repositories'; |
150 | 154 | } |
@@ -1,9 +1,7 @@ |
||
1 | 1 | <?php namespace Savannabits\JetstreamInertiaGenerator\Generators; |
2 | 2 | |
3 | -use Doctrine\DBAL\Schema\ForeignKeyConstraint; |
|
4 | -use Savannabits\JetstreamInertiaGenerator\Generators\Traits\FileManipulations; |
|
5 | 3 | use Illuminate\Support\Str; |
6 | -use Illuminate\Support\Arr; |
|
4 | +use Savannabits\JetstreamInertiaGenerator\Generators\Traits\FileManipulations; |
|
7 | 5 | use Symfony\Component\Console\Input\InputOption; |
8 | 6 | |
9 | 7 | class ApiController extends ClassGenerator { |
@@ -168,6 +168,10 @@ |
||
168 | 168 | { |
169 | 169 | return $rootNamespace.'\Http\Controllers\Admin'; |
170 | 170 | } |
171 | + |
|
172 | + /** |
|
173 | + * @param string $rootNamespace |
|
174 | + */ |
|
171 | 175 | protected function getRepoNamespace($rootNamespace) { |
172 | 176 | return $rootNamespace.'Repositories'; |
173 | 177 | } |
@@ -1,9 +1,7 @@ |
||
1 | 1 | <?php namespace Savannabits\JetstreamInertiaGenerator\Generators; |
2 | 2 | |
3 | -use Doctrine\DBAL\Schema\ForeignKeyConstraint; |
|
4 | -use Savannabits\JetstreamInertiaGenerator\Generators\Traits\FileManipulations; |
|
5 | 3 | use Illuminate\Support\Str; |
6 | -use Illuminate\Support\Arr; |
|
4 | +use Savannabits\JetstreamInertiaGenerator\Generators\Traits\FileManipulations; |
|
7 | 5 | use Symfony\Component\Console\Input\InputOption; |
8 | 6 | |
9 | 7 | class Controller extends ClassGenerator { |
@@ -1,6 +1,5 @@ |
||
1 | 1 | <?php namespace Savannabits\JetstreamInertiaGenerator\Generators; |
2 | 2 | |
3 | -use Illuminate\Support\Str; |
|
4 | 3 | use Symfony\Component\Console\Input\InputOption; |
5 | 4 | |
6 | 5 | class Export extends ClassGenerator { |
@@ -1,6 +1,5 @@ |
||
1 | 1 | <?php namespace Savannabits\JetstreamInertiaGenerator\Generators; |
2 | 2 | |
3 | -use Illuminate\Support\Str; |
|
4 | 3 | use Symfony\Component\Console\Input\InputOption; |
5 | 4 | |
6 | 5 | class ModelFactory extends FileAppender { |
@@ -68,8 +68,8 @@ |
||
68 | 68 | /** |
69 | 69 | * Determine if the file already exists. |
70 | 70 | * |
71 | - * @param $path |
|
72 | - * @return bool |
|
71 | + * @param string $path |
|
72 | + * @return string|false |
|
73 | 73 | */ |
74 | 74 | protected function alreadyExists($path) |
75 | 75 | { |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php namespace Savannabits\JetstreamInertiaGenerator\Generators; |
2 | 2 | |
3 | -use Savannabits\JetstreamInertiaGenerator\Generators\Traits\FileManipulations; |
|
4 | 3 | use Illuminate\Support\Str; |
4 | +use Savannabits\JetstreamInertiaGenerator\Generators\Traits\FileManipulations; |
|
5 | 5 | use Symfony\Component\Console\Input\InputOption; |
6 | 6 | |
7 | 7 | class Policy extends ClassGenerator { |
@@ -1,9 +1,7 @@ |
||
1 | 1 | <?php namespace Savannabits\JetstreamInertiaGenerator\Generators; |
2 | 2 | |
3 | -use Doctrine\DBAL\Schema\ForeignKeyConstraint; |
|
4 | -use Savannabits\JetstreamInertiaGenerator\Generators\Traits\FileManipulations; |
|
5 | 3 | use Illuminate\Support\Str; |
6 | -use Illuminate\Support\Arr; |
|
4 | +use Savannabits\JetstreamInertiaGenerator\Generators\Traits\FileManipulations; |
|
7 | 5 | use Symfony\Component\Console\Input\InputOption; |
8 | 6 | |
9 | 7 | class Repository extends ClassGenerator { |
@@ -1,7 +1,5 @@ |
||
1 | 1 | <?php namespace Savannabits\JetstreamInertiaGenerator\Generators; |
2 | 2 | |
3 | -use Doctrine\DBAL\Schema\ForeignKeyConstraint; |
|
4 | -use Illuminate\Support\Str; |
|
5 | 3 | use Symfony\Component\Console\Input\InputOption; |
6 | 4 | |
7 | 5 | class StoreRequest extends ClassGenerator { |
@@ -76,6 +76,9 @@ |
||
76 | 76 | ; |
77 | 77 | } |
78 | 78 | |
79 | + /** |
|
80 | + * @param string $modelVariableName |
|
81 | + */ |
|
79 | 82 | protected function getVisibleColumns($tableName, $modelVariableName) { |
80 | 83 | $relationships = $this->setBelongsToRelations(); |
81 | 84 | $columns = $this->readColumnsFromTable($tableName); |
@@ -1,9 +1,6 @@ |
||
1 | 1 | <?php namespace Savannabits\JetstreamInertiaGenerator\Generators\Traits; |
2 | 2 | |
3 | -use Doctrine\DBAL\DriverManager; |
|
4 | 3 | use Doctrine\DBAL\Schema\ForeignKeyConstraint; |
5 | -use Illuminate\Database\Capsule\Manager; |
|
6 | -use Illuminate\Database\DatabaseManager; |
|
7 | 4 | use Illuminate\Support\Collection; |
8 | 5 | use Illuminate\Support\Str; |
9 | 6 | use Schema; |