@@ -35,10 +35,10 @@ |
||
35 | 35 | { |
36 | 36 | $this->app->bind( |
37 | 37 | 'Modules\Recipe\Repositories\RecipeRepository', |
38 | - function () { |
|
38 | + function() { |
|
39 | 39 | $repository = new \Modules\Recipe\Repositories\Eloquent\EloquentRecipeRepository(new \Modules\Recipe\Entities\Recipe()); |
40 | 40 | |
41 | - if (! config('app.cache')) { |
|
41 | + if (!config('app.cache')) { |
|
42 | 42 | return $repository; |
43 | 43 | } |
44 | 44 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | return [ |
4 | - 'name' => 'Recipe' |
|
4 | + 'name' => 'Recipe' |
|
5 | 5 | ]; |
6 | 6 | \ No newline at end of file |
@@ -3,8 +3,8 @@ |
||
3 | 3 | use Illuminate\Routing\Router; |
4 | 4 | /** @var Router $router */ |
5 | 5 | |
6 | -$router->group(['prefix' =>'/recipe'], function (Router $router) { |
|
7 | - $router->bind('recipes', function ($id) { |
|
6 | +$router->group(['prefix' =>'/recipe'], function(Router $router) { |
|
7 | + $router->bind('recipes', function($id) { |
|
8 | 8 | return app('Modules\Recipe\Repositories\RecipeRepository')->find($id); |
9 | 9 | }); |
10 | 10 | $router->resource('recipes', 'RecipeController', ['except' => ['show'], 'names' => [ |
@@ -29,14 +29,14 @@ |
||
29 | 29 | */ |
30 | 30 | public function extendWith(Menu $menu) |
31 | 31 | { |
32 | - $menu->group(trans('core::sidebar.content'), function (Group $group) { |
|
33 | - $group->item('Recipe', function (Item $item) { |
|
32 | + $menu->group(trans('core::sidebar.content'), function(Group $group) { |
|
33 | + $group->item('Recipe', function(Item $item) { |
|
34 | 34 | $item->icon('fa fa-copy'); |
35 | 35 | $item->weight(10); |
36 | 36 | $item->authorize( |
37 | 37 | $this->auth->hasAccess('recipe.recipes.index') |
38 | 38 | ); |
39 | - $item->item(trans('recipe::recipes.title.recipes'), function (Item $item) { |
|
39 | + $item->item(trans('recipe::recipes.title.recipes'), function(Item $item) { |
|
40 | 40 | $item->icon('fa fa-copy'); |
41 | 41 | $item->weight(0); |
42 | 42 | $item->append('admin.recipe.recipe.create'); |
@@ -5,27 +5,27 @@ |
||
5 | 5 | |
6 | 6 | class CreateRecipeRecipesTable extends Migration |
7 | 7 | { |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('recipe__recipes', function(Blueprint $table) { |
|
16 | - $table->engine = 'InnoDB'; |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('recipe__recipes', function(Blueprint $table) { |
|
16 | + $table->engine = 'InnoDB'; |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->timestamps(); |
19 | - }); |
|
20 | - } |
|
19 | + }); |
|
20 | + } |
|
21 | 21 | |
22 | - /** |
|
23 | - * Reverse the migrations. |
|
24 | - * |
|
25 | - * @return void |
|
26 | - */ |
|
27 | - public function down() |
|
28 | - { |
|
29 | - Schema::drop('recipe__recipes'); |
|
30 | - } |
|
22 | + /** |
|
23 | + * Reverse the migrations. |
|
24 | + * |
|
25 | + * @return void |
|
26 | + */ |
|
27 | + public function down() |
|
28 | + { |
|
29 | + Schema::drop('recipe__recipes'); |
|
30 | + } |
|
31 | 31 | } |
@@ -5,33 +5,33 @@ |
||
5 | 5 | |
6 | 6 | class CreateRecipeRecipeTranslationsTable extends Migration |
7 | 7 | { |
8 | - /** |
|
9 | - * Run the migrations. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function up() |
|
14 | - { |
|
15 | - Schema::create('recipe__recipe_translations', function(Blueprint $table) { |
|
16 | - $table->engine = 'InnoDB'; |
|
8 | + /** |
|
9 | + * Run the migrations. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function up() |
|
14 | + { |
|
15 | + Schema::create('recipe__recipe_translations', function(Blueprint $table) { |
|
16 | + $table->engine = 'InnoDB'; |
|
17 | 17 | $table->increments('id'); |
18 | - $table->string('name'); |
|
19 | - $table->text('content'); |
|
18 | + $table->string('name'); |
|
19 | + $table->text('content'); |
|
20 | 20 | |
21 | 21 | $table->integer('recipe_id')->unsigned(); |
22 | 22 | $table->string('locale')->index(); |
23 | 23 | $table->unique(['recipe_id', 'locale']); |
24 | 24 | $table->foreign('recipe_id')->references('id')->on('recipe__recipes')->onDelete('cascade'); |
25 | - }); |
|
26 | - } |
|
25 | + }); |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * Reverse the migrations. |
|
30 | - * |
|
31 | - * @return void |
|
32 | - */ |
|
33 | - public function down() |
|
34 | - { |
|
35 | - Schema::drop('recipe__recipe_translations'); |
|
36 | - } |
|
28 | + /** |
|
29 | + * Reverse the migrations. |
|
30 | + * |
|
31 | + * @return void |
|
32 | + */ |
|
33 | + public function down() |
|
34 | + { |
|
35 | + Schema::drop('recipe__recipe_translations'); |
|
36 | + } |
|
37 | 37 | } |
@@ -5,16 +5,16 @@ |
||
5 | 5 | |
6 | 6 | class RecipeDatabaseSeeder extends Seeder { |
7 | 7 | |
8 | - /** |
|
9 | - * Run the database seeds. |
|
10 | - * |
|
11 | - * @return void |
|
12 | - */ |
|
13 | - public function run() |
|
14 | - { |
|
15 | - Model::unguard(); |
|
8 | + /** |
|
9 | + * Run the database seeds. |
|
10 | + * |
|
11 | + * @return void |
|
12 | + */ |
|
13 | + public function run() |
|
14 | + { |
|
15 | + Model::unguard(); |
|
16 | 16 | |
17 | - // $this->call("OthersTableSeeder"); |
|
18 | - } |
|
17 | + // $this->call("OthersTableSeeder"); |
|
18 | + } |
|
19 | 19 | |
20 | 20 | } |
21 | 21 | \ No newline at end of file |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $this->artisan('module:make', ['name' => ['Blog']]); |
42 | 42 | |
43 | 43 | foreach (config('modules.paths.generator') as $directory) { |
44 | - $this->assertTrue(is_dir($this->modulePath . '/' . $directory)); |
|
44 | + $this->assertTrue(is_dir($this->modulePath.'/'.$directory)); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->artisan('module:make', ['name' => ['Blog']]); |
52 | 52 | |
53 | 53 | foreach (config('modules.stubs.files') as $file) { |
54 | - $this->assertTrue(is_file($this->modulePath . '/' . $file)); |
|
54 | + $this->assertTrue(is_file($this->modulePath.'/'.$file)); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** @test */ |
35 | 35 | public function it_returns_a_collection() |
36 | 36 | { |
37 | - $this->repository->addLocation(__DIR__ . '/stubs'); |
|
37 | + $this->repository->addLocation(__DIR__.'/stubs'); |
|
38 | 38 | |
39 | 39 | $this->assertInstanceOf(Collection::class, $this->repository->toCollection()); |
40 | 40 | $this->assertInstanceOf(Collection::class, $this->repository->collections()); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | /** @test */ |
44 | 44 | public function it_returns_all_enabled_modules() |
45 | 45 | { |
46 | - $this->repository->addLocation(__DIR__ . '/stubs'); |
|
46 | + $this->repository->addLocation(__DIR__.'/stubs'); |
|
47 | 47 | |
48 | 48 | $this->assertCount(1, $this->repository->getByStatus(1)); |
49 | 49 | $this->assertCount(1, $this->repository->enabled()); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | /** @test */ |
53 | 53 | public function it_returns_all_disabled_modules() |
54 | 54 | { |
55 | - $this->repository->addLocation(__DIR__ . '/stubs'); |
|
55 | + $this->repository->addLocation(__DIR__.'/stubs'); |
|
56 | 56 | |
57 | 57 | $this->assertCount(0, $this->repository->getByStatus(0)); |
58 | 58 | $this->assertCount(0, $this->repository->disabled()); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | /** @test */ |
62 | 62 | public function it_counts_all_modules() |
63 | 63 | { |
64 | - $this->repository->addLocation(__DIR__ . '/stubs'); |
|
64 | + $this->repository->addLocation(__DIR__.'/stubs'); |
|
65 | 65 | |
66 | 66 | $this->assertEquals(1, $this->repository->count()); |
67 | 67 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | /** @test */ |
70 | 70 | public function it_finds_a_module() |
71 | 71 | { |
72 | - $this->repository->addLocation(__DIR__ . '/stubs/Recipe'); |
|
72 | + $this->repository->addLocation(__DIR__.'/stubs/Recipe'); |
|
73 | 73 | |
74 | 74 | $this->assertInstanceOf(Module::class, $this->repository->find('recipe')); |
75 | 75 | $this->assertInstanceOf(Module::class, $this->repository->get('recipe')); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | /** @test */ |
87 | 87 | public function it_finds_the_module_asset_path() |
88 | 88 | { |
89 | - $this->repository->addLocation(__DIR__ . '/stubs/Recipe'); |
|
89 | + $this->repository->addLocation(__DIR__.'/stubs/Recipe'); |
|
90 | 90 | $assetPath = $this->repository->assetPath('recipe'); |
91 | 91 | |
92 | 92 | $this->assertEquals(public_path('modules/recipe'), $assetPath); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** @test */ |
104 | 104 | public function it_sets_used_module() |
105 | 105 | { |
106 | - $this->repository->addLocation(__DIR__ . '/stubs/Recipe'); |
|
106 | + $this->repository->addLocation(__DIR__.'/stubs/Recipe'); |
|
107 | 107 | |
108 | 108 | $this->repository->setUsed('Recipe'); |
109 | 109 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | /** @test */ |
135 | 135 | public function it_can_detect_if_module_is_active() |
136 | 136 | { |
137 | - $this->repository->addLocation(__DIR__ . '/stubs/Recipe'); |
|
137 | + $this->repository->addLocation(__DIR__.'/stubs/Recipe'); |
|
138 | 138 | |
139 | 139 | $this->assertTrue($this->repository->active('Recipe')); |
140 | 140 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /** @test */ |
143 | 143 | public function it_can_detect_if_module_is_inactive() |
144 | 144 | { |
145 | - $this->repository->addLocation(__DIR__ . '/stubs/Recipe'); |
|
145 | + $this->repository->addLocation(__DIR__.'/stubs/Recipe'); |
|
146 | 146 | |
147 | 147 | $this->assertFalse($this->repository->notActive('Recipe')); |
148 | 148 | } |