Skip to content

Commit 7fd29e1

Browse files
authored
Merge pull request #13 from laramoud/develop
Develop
2 parents 9f9fb12 + 9b66f50 commit 7fd29e1

37 files changed

+257
-233
lines changed

composer.json

+12-21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "pravodev/laramoud",
2+
"name": "laramoud/laravel-modules",
33
"description": "Laravel modular, laravel management, modularized",
44
"keywords": [
55
"modules",
@@ -18,48 +18,39 @@
1818
"require": {
1919
"php": ">=7.2",
2020
"composer-plugin-api": "^1.0",
21-
"pravodev/laramoud-installer": "dev-master",
21+
"pravodev/laramoud-installer": "^1.0",
2222
"ext-zip": "*",
2323
"guzzlehttp/guzzle": "~6.0",
2424
"symfony/console": "~3.0|~4.0",
2525
"symfony/filesystem": "~3.0|~4.0",
2626
"symfony/process": "~3.0|~4.0"
2727
},
2828
"support": {
29-
"issues": "https://github.com/pravodev/laramoud/issues"
29+
"issues": "https://github.com/laramoud/laravel-modules/issues"
3030
},
3131
"require-dev": {
3232
"phpunit/phpunit": "~7.0|~8.0",
33-
"laravel/framework": "5.8.*",
33+
"laravel/framework": "5.*",
3434
"phpstan/phpstan": "^0.9.2"
3535
},
36-
"repositories": [
37-
{
38-
"type": "path",
39-
"url": "/var/www/pravo/laramoud-installer",
40-
"options": {
41-
"symlink": true
42-
}
43-
}
44-
],
4536
"autoload": {
4637
"psr-4": {
47-
"Pravodev\\Laramoud\\": "src"
38+
"Laramoud\\Modules\\": "src"
4839
}
4940
},
5041
"autoload-dev": {
5142
"psr-4": {
52-
"Pravodev\\Laramoud\\Tests\\": "tests"
53-
}
43+
"Laramoud\\Modules\\Tests\\": "tests"
44+
},
45+
"files": [
46+
"src/Utils/Helper.php"
47+
]
5448
},
5549
"extra": {
5650
"laravel": {
5751
"providers": [
58-
"Pravodev\\Laramoud\\LaramoudServiceProvider"
59-
],
60-
"aliases": {
61-
"Laramoud": "Pravodev\\Laramoud\\Laramoud"
62-
}
52+
"Laramoud\\Modules\\LaramoudServiceProvider"
53+
]
6354
}
6455
}
6556
}

src/Commands/ClearCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
* Copyright © 2019 PondokIT. All rights reserved.
1111
*/
1212

13-
namespace Pravodev\Laramoud\Commands;
13+
namespace Laramoud\Modules\Commands;
1414

1515
use Illuminate\Console\Command;
16-
use Pravodev\Laramoud\Contracts\Module;
16+
use Laramoud\Modules\Contracts\Module;
1717

1818
class ClearCommand extends Command
1919
{

src/Commands/Generators/ChannelMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\ChannelMakeCommand as BaseChannelMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class ChannelMakeCommand extends BaseChannelMakeCommand
99
{

src/Commands/Generators/ConsoleMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\ConsoleMakeCommand as BaseConsoleMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class ConsoleMakeCommand extends BaseConsoleMakeCommand
99
{

src/Commands/Generators/ControllerMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
* Copyright © 2019 PondokIT. All rights reserved.
1111
*/
1212

13-
namespace Pravodev\Laramoud\Commands\Generators;
13+
namespace Laramoud\Modules\Commands\Generators;
1414

1515
use Illuminate\Routing\Console\ControllerMakeCommand as BaseControllerMakeCommand;
16-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
16+
use Laramoud\Modules\Contracts\GeneratorTrait;
1717

1818
class ControllerMakeCommand extends BaseControllerMakeCommand
1919
{

src/Commands/Generators/EventMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\EventMakeCommand as BaseEventMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class EventMakeCommand extends BaseEventMakeCommand
99
{

src/Commands/Generators/ExceptionMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\ExceptionMakeCommand as BaseExceptionMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class ExceptionMakeCommand extends BaseExceptionMakeCommand
99
{

src/Commands/Generators/FactoryMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Database\Console\Factories\FactoryMakeCommand as BaseFactoryMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class FactoryMakeCommand extends BaseFactoryMakeCommand
99
{

src/Commands/Generators/JobMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\JobMakeCommand as BaseJobMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class JobMakeCommand extends BaseJobMakeCommand
99
{

src/Commands/Generators/ListenerMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\ListenerMakeCommand as BaseListenerMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class ListenerMakeCommand extends BaseListenerMakeCommand
99
{

src/Commands/Generators/MailMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\MailMakeCommand as BaseMailMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class MailMakeCommand extends BaseMailMakeCommand
99
{

src/Commands/Generators/MiddlewareMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Routing\Console\MiddlewareMakeCommand as BaseMiddlewareMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class MiddlewareMakeCommand extends BaseMiddlewareMakeCommand
99
{

src/Commands/Generators/MigrateMakeCommand.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
* Copyright © 2019 PondokIT. All rights reserved.
1111
*/
1212

13-
namespace Pravodev\Laramoud\Commands\Generators;
13+
namespace Laramoud\Modules\Commands\Generators;
1414

1515
use Illuminate\Console\Command;
16-
use Pravodev\Laramoud\Contracts\Module;
16+
use Laramoud\Modules\Contracts\Module;
1717

1818
class MigrateMakeCommand extends Command
1919
{
@@ -45,6 +45,11 @@ public function __construct()
4545

4646
public function handle()
4747
{
48+
if(file_exists($this->getModulePath($this->argument('module_name')).'/') == false){
49+
$this->error('module with name '. $this->argument('module_name').' not found');
50+
return;
51+
}
52+
4853
$this->call('make:migration', [
4954
'name' => $this->argument('name'),
5055
'--create' => $this->option('create'),

src/Commands/Generators/ModelMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\ModelMakeCommand as BaseModelMakeCommand;
66
use Illuminate\Support\Str;
7-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
7+
use Laramoud\Modules\Contracts\GeneratorTrait;
88

99
class ModelMakeCommand extends BaseModelMakeCommand
1010
{

src/Commands/Generators/NotificationMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\NotificationMakeCommand as BaseNotificationMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class NotificationMakeCommand extends BaseNotificationMakeCommand
99
{

src/Commands/Generators/ObserverMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\ObserverMakeCommand as BaseObserverMakeCommand;
66
use Illuminate\Support\Str;
7-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
7+
use Laramoud\Modules\Contracts\GeneratorTrait;
88

99
class ObserverMakeCommand extends BaseObserverMakeCommand
1010
{

src/Commands/Generators/PolicyMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\PolicyMakeCommand as BasePolicyMakeCommand;
66
use Illuminate\Support\Str;
7-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
7+
use Laramoud\Modules\Contracts\GeneratorTrait;
88

99
class PolicyMakeCommand extends BasePolicyMakeCommand
1010
{

src/Commands/Generators/ProviderMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\ProviderMakeCommand as BaseProviderMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class ProviderMakeCommand extends BaseProviderMakeCommand
99
{

src/Commands/Generators/RequestMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\RequestMakeCommand as BaseRequestMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class RequestMakeCommand extends BaseRequestMakeCommand
99
{

src/Commands/Generators/ResourceMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\ResourceMakeCommand as BaseResourceMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class ResourceMakeCommand extends BaseResourceMakeCommand
99
{

src/Commands/Generators/RuleMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\RuleMakeCommand as BaseRuleMakeCommand;
6-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
6+
use Laramoud\Modules\Contracts\GeneratorTrait;
77

88
class RuleMakeCommand extends BaseRuleMakeCommand
99
{

src/Commands/Generators/SeederMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Database\Console\Seeds\SeederMakeCommand as BaseSeederMakeCommand;
66
use Illuminate\Filesystem\Filesystem;
77
use Illuminate\Support\Composer;
8-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
8+
use Laramoud\Modules\Contracts\GeneratorTrait;
99

1010
class SeederMakeCommand extends BaseSeederMakeCommand
1111
{

src/Commands/Generators/TestMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Generators;
3+
namespace Laramoud\Modules\Commands\Generators;
44

55
use Illuminate\Foundation\Console\TestMakeCommand as BaseTestMakeCommand;
66
use Illuminate\Support\Str;
7-
use Pravodev\Laramoud\Contracts\GeneratorTrait;
7+
use Laramoud\Modules\Contracts\GeneratorTrait;
88

99
class TestMakeCommand extends BaseTestMakeCommand
1010
{

src/Commands/Migrations/MigrateCommand.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Pravodev\Laramoud\Commands\Migrations;
3+
namespace Laramoud\Modules\Commands\Migrations;
44

55
use Illuminate\Console\Command;
6-
use Pravodev\Laramoud\Contracts\Module;
6+
use Laramoud\Modules\Contracts\Module;
77

88
class MigrateCommand extends Command
99
{
@@ -42,6 +42,11 @@ public function __construct()
4242
*/
4343
public function handle()
4444
{
45+
if(file_exists($this->getModulePath($this->argument('module_name')).'/') == false){
46+
$this->error('module with name '. $this->argument('module_name').' not found');
47+
return;
48+
}
49+
4550
$this->call('migrate', [
4651
'--database' => $this->option('database'),
4752
'--path' => $this->getMigrationPath(),

0 commit comments

Comments
 (0)