Skip to content

Commit 68c8233

Browse files
author
Md. Mahbub Rabbani
committed
update to laravel5.5
1 parent 6694158 commit 68c8233

File tree

9 files changed

+42
-16
lines changed

9 files changed

+42
-16
lines changed

README.md

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1+
# Laravel Module Manager
2+
- [Introduction](#introduction)
3+
- [Installation](#installation)
4+
- [Folder Structure](#folder-structure)
5+
- Uses
6+
- [Configuration](#configuration)
7+
- [Available Commands](#available-commands)
8+
- [Loading Component](#loading-component)
9+
- [Loading View](#loading-view)
10+
- [Loading Translation](#loading-translation)
11+
- [Loading Config File](#loading-config-file)
12+
113
# Introduction
214
When you work on small project, you will feel laravel default structure
315
is enough. When your project grows up, you will think to divide
4-
your app into module where each module will contain all of it resources
16+
your app into modules where each module will contain all of it resources
517
such as Controllers, Models, Views, Migrations, Config etc. This `laravel-module-manager`
618
package will help you to manage laravel modular application easily.
719

@@ -24,7 +36,7 @@ To create new module run the bellow command:
2436
php artisan module:create name-of-your-module
2537
php artisan module:install {module_alias_name}
2638

27-
39+
### Folder Structure
2840
If your module name is `module1` the module structure will be
2941

3042
![Module Structure](https://mrabbani.github.io/public/images/module_structure.png "Module Structure")
@@ -40,7 +52,7 @@ into your application's base directory. If you want to change publish
4052
Now you can change the default *modules* directory by changing
4153
`module_directory` value of `config/module_manager.php` file.
4254

43-
### Available commands
55+
### Available Commands
4456

4557
To see all module related commands run `php artisan` into terminal.
4658
Available commands are:
@@ -75,7 +87,7 @@ You must install your module to activate
7587
### Loading Component
7688
You have to load views, config and translation by following [laravel package](https://laravel.com/docs/5.3/packages#resources)
7789

78-
##### Loading view
90+
##### Loading View
7991

8092
view(module_alias::view_file)
8193

@@ -84,12 +96,12 @@ you may load the **module1** module's `index.blade.php` view like so:
8496
view('module1::index');
8597

8698

87-
##### Loading translation
99+
##### Loading Translation
88100

89101
you may load the **module1** module's `welcome` line from the `messages` file like so:
90102

91103
trans('module1::messages.welcome');
92-
##### Loading config file
104+
##### Loading Config File
93105

94106
you may load the **module1** module's `welcome` line from the `messages` file like so:
95107

composer.json

+16-3
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,27 @@
99
}
1010
],
1111
"require": {
12-
"php": ">=5.6.4",
13-
"illuminate/console": "5.4.*",
14-
"illuminate/database": "5.4.*"
12+
"php": ">=7.0.0",
13+
"illuminate/console": "5.5.*",
14+
"illuminate/database": "5.5.*"
1515
},
1616
"autoload": {
1717
"psr-4": {
1818
"Mrabbani\\ModuleManager\\": "src/"
1919
}
2020
},
21+
"autoload-dev": {
22+
"psr-4": {
23+
"Mrabbani\\Tests\\": "tests/"
24+
}
25+
},
26+
"extra": {
27+
"laravel": {
28+
"providers": [
29+
"Mrabbani\\ModuleManager\\Providers\\ModuleProvider"
30+
]
31+
}
32+
},
33+
2134
"license": "MIT"
2235
}

src/Console/Commands/RouteListCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public function handle()
9494
public function setModulesNamespace()
9595
{
9696
if($this->module !== 'all') {
97-
$modules = get_module_information($this->module);
97+
$modules[] = get_module_information($this->module);
98+
9899
} else {
99100
$modules = get_all_module_information();
100101
}

src/Console/Generators/MakeMigration.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function __construct(MigrationCreator $creator, Composer $composer)
6060
$this->composer->setWorkingPath(base_path());
6161
}
6262

63-
public function fire()
63+
public function handle()
6464
{
6565
// It's possible for the developer to specify the tables to modify in this
6666
// schema operation. The developer may also specify if this table needs

src/Console/Generators/MakeModel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MakeModel extends AbstractGenerator
3434
*
3535
* @return bool|null
3636
*/
37-
public function fire()
37+
public function handle()
3838
{
3939
$nameInput = $this->getNameInput();
4040

src/Console/Generators/MakeRepository.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MakeRepository extends AbstractGenerator
3434
*
3535
* @return bool|null
3636
*/
37-
public function fire()
37+
public function handle()
3838
{
3939
$nameInput = $this->getNameInput();
4040

src/Console/Generators/MakeView.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function getStub()
4444
*
4545
* @return bool|null
4646
*/
47-
public function fire()
47+
public function handle()
4848
{
4949
$nameInput = $this->getNameInput();
5050

src/Console/Migrations/RollbackCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct(Migrator $migrator)
5454
*
5555
* @return void
5656
*/
57-
public function fire()
57+
public function handle()
5858
{
5959
if (! $this->confirmToProceed()) {
6060
return;

tests/Unit/ModuleManagerTest.php

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

3-
namespace Tests\Unit;
3+
namespace Mrabbani\Tests\Unit;
44

55
use Illuminate\Support\Facades\Artisan;
66
use Tests\TestCase;

0 commit comments

Comments
 (0)