@@ -108,12 +108,12 @@ |
||
| 108 | 108 | public function getAttributes($entity) |
| 109 | 109 | { |
| 110 | 110 | return [ |
| 111 | - 'file' => (string)$entity->file, |
|
| 112 | - 'file_info' => json_decode($entity->file_info), |
|
| 113 | - 'created_by' => (integer)$entity->created_by, |
|
| 114 | - 'updated_by' => (integer)$entity->updated_by, |
|
| 115 | - 'created_at' => Carbon::parse($entity->created_at)->setTimezone('UTC')->format(Carbon::ISO8601), |
|
| 116 | - 'updated_at' => Carbon::parse($entity->updated_at)->setTimezone('UTC')->format(Carbon::ISO8601), |
|
| 111 | + 'file' => (string)$entity->file, |
|
| 112 | + 'file_info' => json_decode($entity->file_info), |
|
| 113 | + 'created_by' => (integer)$entity->created_by, |
|
| 114 | + 'updated_by' => (integer)$entity->updated_by, |
|
| 115 | + 'created_at' => Carbon::parse($entity->created_at)->setTimezone('UTC')->format(Carbon::ISO8601), |
|
| 116 | + 'updated_at' => Carbon::parse($entity->updated_at)->setTimezone('UTC')->format(Carbon::ISO8601), |
|
| 117 | 117 | ]; |
| 118 | 118 | } |
| 119 | 119 | } |
@@ -22,12 +22,12 @@ |
||
| 22 | 22 | protected $table = 'media_files'; |
| 23 | 23 | |
| 24 | 24 | protected $fillable = [ |
| 25 | - 'file', |
|
| 26 | - 'file_info', |
|
| 27 | - 'created_by', |
|
| 28 | - 'updated_by', |
|
| 29 | - 'created_at', |
|
| 30 | - 'updated_at', |
|
| 25 | + 'file', |
|
| 26 | + 'file_info', |
|
| 27 | + 'created_by', |
|
| 28 | + 'updated_by', |
|
| 29 | + 'created_at', |
|
| 30 | + 'updated_at', |
|
| 31 | 31 | ]; |
| 32 | 32 | |
| 33 | 33 | private static $allowedMimeTypes = [ |
@@ -9,8 +9,7 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | public function up() |
| 11 | 11 | { |
| 12 | - Capsule::schema()->create('media_files', function($table) |
|
| 13 | - { |
|
| 12 | + Capsule::schema()->create('media_files', function($table) { |
|
| 14 | 13 | $table->increments('id'); |
| 15 | 14 | $table->string('file'); |
| 16 | 15 | $table->string('file_info'); |