@@ -27,15 +27,15 @@ discard block |
||
27 | 27 | |
28 | 28 | $this->publishes( |
29 | 29 | [ |
30 | - __DIR__ . '/../../resources/config/img-attacher.php' |
|
30 | + __DIR__.'/../../resources/config/img-attacher.php' |
|
31 | 31 | => config_path('img-attacher.php'), |
32 | - __DIR__ . '/../../resources/database/migrations/' . $migration_file_name |
|
33 | - => database_path('migrations/'. $migration_file_name), |
|
32 | + __DIR__.'/../../resources/database/migrations/'.$migration_file_name |
|
33 | + => database_path('migrations/'.$migration_file_name), |
|
34 | 34 | ] |
35 | 35 | ); |
36 | 36 | |
37 | 37 | $this->mergeConfigFrom( |
38 | - __DIR__ . '/../../resources/config/img-attacher.php', 'img-attacher' |
|
38 | + __DIR__.'/../../resources/config/img-attacher.php', 'img-attacher' |
|
39 | 39 | ); |
40 | 40 | |
41 | 41 | $this->registerEvents(); |
@@ -58,15 +58,15 @@ discard block |
||
58 | 58 | |
59 | 59 | private function registerEvents() |
60 | 60 | { |
61 | - AttacherImage::saving(function ($model) { |
|
62 | - if ( ! app('img-attacher')->writeImage($model)) { |
|
61 | + AttacherImage::saving(function($model) { |
|
62 | + if ( ! app('img-attacher')->writeImage($model)) { |
|
63 | 63 | return false; |
64 | 64 | } |
65 | 65 | return true; |
66 | 66 | }); |
67 | 67 | |
68 | - AttacherImage::deleting(function ($model) { |
|
69 | - if ( ! app('img-attacher')->deleteImages($model)) { |
|
68 | + AttacherImage::deleting(function($model) { |
|
69 | + if ( ! app('img-attacher')->deleteImages($model)) { |
|
70 | 70 | return false; |
71 | 71 | } |
72 | 72 | return true; |
@@ -97,17 +97,17 @@ discard block |
||
97 | 97 | |
98 | 98 | private function registerFilePathManager() |
99 | 99 | { |
100 | - $this->app->singleton('img-attacher.FilePathManager', function () |
|
100 | + $this->app->singleton('img-attacher.FilePathManager', function() |
|
101 | 101 | { |
102 | 102 | $config = config('img-attacher'); |
103 | 103 | |
104 | - return new FilePathManager($config['path_to_save'],$config['base_url'], $config['processing_styles_routines']); |
|
104 | + return new FilePathManager($config['path_to_save'], $config['base_url'], $config['processing_styles_routines']); |
|
105 | 105 | }); |
106 | 106 | } |
107 | 107 | |
108 | 108 | private function registerImageProcessor() |
109 | 109 | { |
110 | - $this->app->singleton('img-attacher.ImageProcessor','CbCaio\ImgAttacher\Processors\ImageProcessor' ); |
|
110 | + $this->app->singleton('img-attacher.ImageProcessor', 'CbCaio\ImgAttacher\Processors\ImageProcessor'); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | private function registerDependencies() |
@@ -14,7 +14,7 @@ |
||
14 | 14 | public function up() |
15 | 15 | { |
16 | 16 | |
17 | - Schema::create('attacher_images', function (Blueprint $table) |
|
17 | + Schema::create('attacher_images', function(Blueprint $table) |
|
18 | 18 | { |
19 | 19 | $table->increments('id'); |
20 | 20 | $table->unsignedInteger('owner_id')->index(); |