diff --git a/.styleci.yml b/.styleci.yml index 055ff2c..fb4eeb1 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -8,7 +8,6 @@ enabled: disabled: - short_array_syntax - - not_operator_with_successor_space finder: exclude: diff --git a/src/AppServiceProvider.php b/src/AppServiceProvider.php index 0a9d384..050fc37 100644 --- a/src/AppServiceProvider.php +++ b/src/AppServiceProvider.php @@ -14,6 +14,7 @@ public function boot() ]); $this->loadMigrationsFrom(__DIR__.'/database/migrations'); + $this->loadRoutesFrom(__DIR__.'/routes/api.php'); $this->publishes([ diff --git a/src/app/Models/Avatar.php b/src/app/Models/Avatar.php index edfd360..a74a9a9 100644 --- a/src/app/Models/Avatar.php +++ b/src/app/Models/Avatar.php @@ -16,14 +16,16 @@ class Avatar extends Model implements Attachable const ImageHeight = 250; protected $optimizeImages = true; + protected $resizeImages = [self::ImageWidth, self::ImageHeight]; + protected $mimeTypes = ['image/png', 'image/jpg', 'image/jpeg']; protected $fillable = ['user_id', 'original_name', 'saved_name']; + protected $hidden = ['user_id', 'created_at', 'updated_at']; - protected $casts = [ - 'user_id' => 'int', - ]; + + protected $casts = ['user_id' => 'int']; public function user() {