diff --git a/app/Http/Controllers/Api/Web/AlexaController.php b/app/Http/Controllers/Api/Web/AlexaController.php index 700dd6bb..7b9f9857 100644 --- a/app/Http/Controllers/Api/Web/AlexaController.php +++ b/app/Http/Controllers/Api/Web/AlexaController.php @@ -2,13 +2,13 @@ namespace App\Http\Controllers\Api\Web; -use Illuminate\Support\Arr; use App\Http\Controllers\Controller; use App\Models\AlexaSession; use App\Models\Track; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Session\Store; +use Illuminate\Support\Arr; use Psr\Log\LoggerInterface; class AlexaController extends Controller diff --git a/app/Http/Controllers/Api/Web/StatsController.php b/app/Http/Controllers/Api/Web/StatsController.php index c0ccb7ff..1f6b1c2a 100644 --- a/app/Http/Controllers/Api/Web/StatsController.php +++ b/app/Http/Controllers/Api/Web/StatsController.php @@ -20,7 +20,6 @@ namespace App\Http\Controllers\Api\Web; -use Illuminate\Support\Str; use App\Http\Controllers\ApiControllerBase; use App\Models\ResourceLogItem; use App\Models\Track; @@ -29,6 +28,7 @@ use Cache; use Carbon\Carbon; use DB; use Illuminate\Database\Eloquent\ModelNotFoundException; +use Illuminate\Support\Str; use Response; class StatsController extends ApiControllerBase diff --git a/app/Models/Album.php b/app/Models/Album.php index ef807da5..c43b343f 100644 --- a/app/Models/Album.php +++ b/app/Models/Album.php @@ -93,7 +93,6 @@ class Album extends Model implements Searchable, Commentable, Favouritable protected $elasticsearchType = 'album'; - protected $fillable = ['user_id', 'title', 'slug']; public static function summary() diff --git a/app/Models/Comment.php b/app/Models/Comment.php index abdffd86..632b3612 100644 --- a/app/Models/Comment.php +++ b/app/Models/Comment.php @@ -72,8 +72,6 @@ class Comment extends Model protected $table = 'comments'; - - public function user() { return $this->belongsTo(User::class); diff --git a/app/Models/Playlist.php b/app/Models/Playlist.php index fc552cb1..7f0ba299 100644 --- a/app/Models/Playlist.php +++ b/app/Models/Playlist.php @@ -95,7 +95,7 @@ class Playlist extends Model implements Searchable, Commentable, Favouritable protected $elasticsearchType = 'playlist'; protected $table = 'playlists'; - + protected $casts = [ 'id' => 'integer', 'user_id' => 'integer', diff --git a/app/Models/Track.php b/app/Models/Track.php index dace9624..89af711a 100644 --- a/app/Models/Track.php +++ b/app/Models/Track.php @@ -153,7 +153,7 @@ class Track extends Model implements Searchable, Commentable, Favouritable protected $elasticsearchType = 'track'; protected $dates = [ - 'published_at', 'released_at' + 'published_at', 'released_at', ]; protected $hidden = ['original_tags', 'metadata']; protected $casts = [