@@ -103,6 +103,8 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | 105 | * |
| 106 | + * @param string $filepath |
|
| 107 | + * @param integer $index |
|
| 106 | 108 | */ |
| 107 | 109 | public function appendFilePathUniqueness($filepath, $index) { |
| 108 | 110 | $ext = $this->takeExtension($filepath); |
@@ -185,6 +187,7 @@ discard block |
||
| 185 | 187 | |
| 186 | 188 | /** |
| 187 | 189 | * |
| 190 | + * @param string $path |
|
| 188 | 191 | */ |
| 189 | 192 | public function chmodDir($path) { |
| 190 | 193 | return @chmod($path, $this->options['chmod_dirs']); |
@@ -192,6 +195,7 @@ discard block |
||
| 192 | 195 | |
| 193 | 196 | /** |
| 194 | 197 | * |
| 198 | + * @param string $path |
|
| 195 | 199 | */ |
| 196 | 200 | public function prepPublicDir($path) { |
| 197 | 201 | return $this->prepDir($this->public_path, $path); |
@@ -199,6 +203,7 @@ discard block |
||
| 199 | 203 | |
| 200 | 204 | /** |
| 201 | 205 | * |
| 206 | + * @param string $root |
|
| 202 | 207 | */ |
| 203 | 208 | public function prepDir($root, $path) { |
| 204 | 209 | $root = rtrim($root, '/'); |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Illuminate\Contracts\Config\Repository as Config; |
| 6 | 6 | use Illuminate\Contracts\Container\Container; |
| 7 | -use Illuminate\Database\ConnectionInterface; |
|
| 8 | 7 | use Illuminate\Routing\Router; |
| 9 | 8 | use Illuminate\Support\ServiceProvider; |
| 10 | 9 | use rdx\filemanager\FileManager; |
@@ -12,18 +12,18 @@ |
||
| 12 | 12 | public function up() { |
| 13 | 13 | Schema::create('files', function(Blueprint $table) { |
| 14 | 14 | $table->increments('id'); |
| 15 | - $table->string('filepath')->collation('utf8_bin'); |
|
| 16 | - $table->string('filename'); |
|
| 17 | - $table->datetime('created_at'); |
|
| 18 | - $table->integer('created_by')->nullable(); |
|
| 15 | + $table->string('filepath')->collation('utf8_bin'); |
|
| 16 | + $table->string('filename'); |
|
| 17 | + $table->datetime('created_at'); |
|
| 18 | + $table->integer('created_by')->nullable(); |
|
| 19 | 19 | }); |
| 20 | 20 | |
| 21 | 21 | Schema::create('files_usage', function(Blueprint $table) { |
| 22 | 22 | $table->integer('file_id')->unsigned()->index(); |
| 23 | - $table->string('used_type')->index(); |
|
| 24 | - $table->string('used_id')->index(); |
|
| 25 | - $table->datetime('created_at'); |
|
| 26 | - $table->integer('created_by')->nullable(); |
|
| 23 | + $table->string('used_type')->index(); |
|
| 24 | + $table->string('used_id')->index(); |
|
| 25 | + $table->datetime('created_at'); |
|
| 26 | + $table->integer('created_by')->nullable(); |
|
| 27 | 27 | |
| 28 | 28 | $table->foreign('file_id')->references('id')->on('files')->onDelete('cascade'); |
| 29 | 29 | }); |