diff --git a/app/Commands/AddTrackToPlaylistCommand.php b/app/Commands/AddTrackToPlaylistCommand.php
index d894d0c1..314e6ce2 100644
--- a/app/Commands/AddTrackToPlaylistCommand.php
+++ b/app/Commands/AddTrackToPlaylistCommand.php
@@ -20,8 +20,8 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Playlist;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Playlist;
+use Poniverse\Ponyfm\Models\Track;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
diff --git a/app/Commands/CreateAlbumCommand.php b/app/Commands/CreateAlbumCommand.php
index bc772f10..c16b6762 100644
--- a/app/Commands/CreateAlbumCommand.php
+++ b/app/Commands/CreateAlbumCommand.php
@@ -20,8 +20,8 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Album;
-use Poniverse\Ponyfm\Image;
+use Poniverse\Ponyfm\Models\Album;
+use Poniverse\Ponyfm\Models\Image;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
diff --git a/app/Commands/CreateCommentCommand.php b/app/Commands/CreateCommentCommand.php
index ceb01af4..ade69196 100644
--- a/app/Commands/CreateCommentCommand.php
+++ b/app/Commands/CreateCommentCommand.php
@@ -20,11 +20,11 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Album;
-use Poniverse\Ponyfm\Comment;
-use Poniverse\Ponyfm\Playlist;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\User;
+use Poniverse\Ponyfm\Models\Album;
+use Poniverse\Ponyfm\Models\Comment;
+use Poniverse\Ponyfm\Models\Playlist;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
diff --git a/app/Commands/CreatePlaylistCommand.php b/app/Commands/CreatePlaylistCommand.php
index 69a731a9..51c9c8f7 100644
--- a/app/Commands/CreatePlaylistCommand.php
+++ b/app/Commands/CreatePlaylistCommand.php
@@ -20,7 +20,7 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Playlist;
+use Poniverse\Ponyfm\Models\Playlist;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
diff --git a/app/Commands/DeleteAlbumCommand.php b/app/Commands/DeleteAlbumCommand.php
index 1e2306f8..d8be88aa 100644
--- a/app/Commands/DeleteAlbumCommand.php
+++ b/app/Commands/DeleteAlbumCommand.php
@@ -20,7 +20,7 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Album;
+use Poniverse\Ponyfm\Models\Album;
use Illuminate\Support\Facades\Auth;
class DeleteAlbumCommand extends CommandBase
diff --git a/app/Commands/DeleteGenreCommand.php b/app/Commands/DeleteGenreCommand.php
index ae9cee0e..0ce27885 100644
--- a/app/Commands/DeleteGenreCommand.php
+++ b/app/Commands/DeleteGenreCommand.php
@@ -22,7 +22,7 @@ namespace Poniverse\Ponyfm\Commands;
use Gate;
use Illuminate\Foundation\Bus\DispatchesJobs;
-use Poniverse\Ponyfm\Genre;
+use Poniverse\Ponyfm\Models\Genre;
use Poniverse\Ponyfm\Jobs\DeleteGenre;
use Validator;
diff --git a/app/Commands/DeletePlaylistCommand.php b/app/Commands/DeletePlaylistCommand.php
index eb5c2cb1..7f20cdca 100644
--- a/app/Commands/DeletePlaylistCommand.php
+++ b/app/Commands/DeletePlaylistCommand.php
@@ -20,7 +20,7 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Playlist;
+use Poniverse\Ponyfm\Models\Playlist;
use Illuminate\Support\Facades\Auth;
class DeletePlaylistCommand extends CommandBase
diff --git a/app/Commands/DeleteTrackCommand.php b/app/Commands/DeleteTrackCommand.php
index fd18a7d9..ee8ceea2 100644
--- a/app/Commands/DeleteTrackCommand.php
+++ b/app/Commands/DeleteTrackCommand.php
@@ -20,7 +20,7 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Track;
class DeleteTrackCommand extends CommandBase
{
diff --git a/app/Commands/EditAlbumCommand.php b/app/Commands/EditAlbumCommand.php
index 2bfadeea..fd8a68cf 100644
--- a/app/Commands/EditAlbumCommand.php
+++ b/app/Commands/EditAlbumCommand.php
@@ -20,8 +20,8 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Album;
-use Poniverse\Ponyfm\Image;
+use Poniverse\Ponyfm\Models\Album;
+use Poniverse\Ponyfm\Models\Image;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
diff --git a/app/Commands/EditPlaylistCommand.php b/app/Commands/EditPlaylistCommand.php
index 796b4511..c4136364 100644
--- a/app/Commands/EditPlaylistCommand.php
+++ b/app/Commands/EditPlaylistCommand.php
@@ -20,8 +20,8 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\PinnedPlaylist;
-use Poniverse\Ponyfm\Playlist;
+use Poniverse\Ponyfm\Models\PinnedPlaylist;
+use Poniverse\Ponyfm\Models\Playlist;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
diff --git a/app/Commands/EditTrackCommand.php b/app/Commands/EditTrackCommand.php
index dae10b6d..10f42a04 100644
--- a/app/Commands/EditTrackCommand.php
+++ b/app/Commands/EditTrackCommand.php
@@ -20,11 +20,11 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Album;
-use Poniverse\Ponyfm\Image;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\TrackType;
-use Poniverse\Ponyfm\User;
+use Poniverse\Ponyfm\Models\Album;
+use Poniverse\Ponyfm\Models\Image;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\TrackType;
+use Poniverse\Ponyfm\Models\User;
use Auth;
use DB;
diff --git a/app/Commands/RenameGenreCommand.php b/app/Commands/RenameGenreCommand.php
index afbe5d9d..46d2f53a 100644
--- a/app/Commands/RenameGenreCommand.php
+++ b/app/Commands/RenameGenreCommand.php
@@ -22,7 +22,7 @@ namespace Poniverse\Ponyfm\Commands;
use Gate;
use Illuminate\Support\Str;
-use Poniverse\Ponyfm\Genre;
+use Poniverse\Ponyfm\Models\Genre;
use Validator;
class RenameGenreCommand extends CommandBase
diff --git a/app/Commands/SaveAccountSettingsCommand.php b/app/Commands/SaveAccountSettingsCommand.php
index 9a285c25..2c535125 100644
--- a/app/Commands/SaveAccountSettingsCommand.php
+++ b/app/Commands/SaveAccountSettingsCommand.php
@@ -20,7 +20,7 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Image;
+use Poniverse\Ponyfm\Models\Image;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
diff --git a/app/Commands/ToggleFavouriteCommand.php b/app/Commands/ToggleFavouriteCommand.php
index 4e97ac3f..c7bff8e3 100644
--- a/app/Commands/ToggleFavouriteCommand.php
+++ b/app/Commands/ToggleFavouriteCommand.php
@@ -20,8 +20,8 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Favourite;
-use Poniverse\Ponyfm\ResourceUser;
+use Poniverse\Ponyfm\Models\Favourite;
+use Poniverse\Ponyfm\Models\ResourceUser;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
diff --git a/app/Commands/ToggleFollowingCommand.php b/app/Commands/ToggleFollowingCommand.php
index ff2c5d66..fda5aa13 100644
--- a/app/Commands/ToggleFollowingCommand.php
+++ b/app/Commands/ToggleFollowingCommand.php
@@ -20,8 +20,8 @@
namespace Poniverse\Ponyfm\Commands;
-use Poniverse\Ponyfm\Follower;
-use Poniverse\Ponyfm\ResourceUser;
+use Poniverse\Ponyfm\Models\Follower;
+use Poniverse\Ponyfm\Models\ResourceUser;
use Illuminate\Support\Facades\Auth;
class ToggleFollowingCommand extends CommandBase
diff --git a/app/Commands/UploadTrackCommand.php b/app/Commands/UploadTrackCommand.php
index 4c09f97c..59b53cbe 100644
--- a/app/Commands/UploadTrackCommand.php
+++ b/app/Commands/UploadTrackCommand.php
@@ -25,18 +25,18 @@ use Config;
use getID3;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Input;
-use Poniverse\Ponyfm\Album;
+use Poniverse\Ponyfm\Models\Album;
use Poniverse\Ponyfm\Exceptions\InvalidEncodeOptionsException;
-use Poniverse\Ponyfm\Genre;
-use Poniverse\Ponyfm\Image;
+use Poniverse\Ponyfm\Models\Genre;
+use Poniverse\Ponyfm\Models\Image;
use Poniverse\Ponyfm\Jobs\EncodeTrackFile;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\TrackFile;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\TrackFile;
use AudioCache;
use File;
use Illuminate\Support\Str;
-use Poniverse\Ponyfm\TrackType;
-use Poniverse\Ponyfm\User;
+use Poniverse\Ponyfm\Models\TrackType;
+use Poniverse\Ponyfm\Models\User;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
diff --git a/app/Console/Commands/ClassifyMLPMA.php b/app/Console/Commands/ClassifyMLPMA.php
index 88f9ec98..926c2988 100644
--- a/app/Console/Commands/ClassifyMLPMA.php
+++ b/app/Console/Commands/ClassifyMLPMA.php
@@ -20,9 +20,9 @@
namespace Poniverse\Ponyfm\Console\Commands;
-use Poniverse\Ponyfm\ShowSong;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\TrackType;
+use Poniverse\Ponyfm\Models\ShowSong;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\TrackType;
use DB;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
diff --git a/app/Console/Commands/ClearTrackCache.php b/app/Console/Commands/ClearTrackCache.php
index 5c5feea1..a807e98c 100644
--- a/app/Console/Commands/ClearTrackCache.php
+++ b/app/Console/Commands/ClearTrackCache.php
@@ -24,7 +24,7 @@ use Carbon\Carbon;
use File;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
-use Poniverse\Ponyfm\TrackFile;
+use Poniverse\Ponyfm\Models\TrackFile;
class ClearTrackCache extends Command
{
@@ -108,4 +108,4 @@ class ClearTrackCache extends Command
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Console/Commands/FixYearZeroLogs.php b/app/Console/Commands/FixYearZeroLogs.php
index 73912193..3e1cc4b1 100644
--- a/app/Console/Commands/FixYearZeroLogs.php
+++ b/app/Console/Commands/FixYearZeroLogs.php
@@ -21,7 +21,7 @@
namespace Poniverse\Ponyfm\Console\Commands;
use Carbon\Carbon;
-use Poniverse\Ponyfm\ResourceLogItem;
+use Poniverse\Ponyfm\Models\ResourceLogItem;
use Illuminate\Console\Command;
class FixYearZeroLogs extends Command
diff --git a/app/Console/Commands/ImportMLPMA.php b/app/Console/Commands/ImportMLPMA.php
index d6907962..cfa55af5 100644
--- a/app/Console/Commands/ImportMLPMA.php
+++ b/app/Console/Commands/ImportMLPMA.php
@@ -20,12 +20,12 @@
namespace Poniverse\Ponyfm\Console\Commands;
-use Poniverse\Ponyfm\Album;
+use Poniverse\Ponyfm\Models\Album;
use Poniverse\Ponyfm\Commands\UploadTrackCommand;
-use Poniverse\Ponyfm\Genre;
-use Poniverse\Ponyfm\Image;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\User;
+use Poniverse\Ponyfm\Models\Genre;
+use Poniverse\Ponyfm\Models\Image;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\User;
use Auth;
use Carbon\Carbon;
use Config;
diff --git a/app/Console/Commands/MergeDuplicateAccounts.php b/app/Console/Commands/MergeDuplicateAccounts.php
index 29136c01..0a400a55 100644
--- a/app/Console/Commands/MergeDuplicateAccounts.php
+++ b/app/Console/Commands/MergeDuplicateAccounts.php
@@ -24,17 +24,17 @@ use Carbon\Carbon;
use DB;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
-use Poniverse\Ponyfm\Album;
-use Poniverse\Ponyfm\Comment;
-use Poniverse\Ponyfm\Favourite;
-use Poniverse\Ponyfm\Follower;
-use Poniverse\Ponyfm\Image;
-use Poniverse\Ponyfm\PinnedPlaylist;
-use Poniverse\Ponyfm\Playlist;
-use Poniverse\Ponyfm\ResourceLogItem;
-use Poniverse\Ponyfm\ResourceUser;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\User;
+use Poniverse\Ponyfm\Models\Album;
+use Poniverse\Ponyfm\Models\Comment;
+use Poniverse\Ponyfm\Models\Favourite;
+use Poniverse\Ponyfm\Models\Follower;
+use Poniverse\Ponyfm\Models\Image;
+use Poniverse\Ponyfm\Models\PinnedPlaylist;
+use Poniverse\Ponyfm\Models\Playlist;
+use Poniverse\Ponyfm\Models\ResourceLogItem;
+use Poniverse\Ponyfm\Models\ResourceUser;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\User;
class MergeDuplicateAccounts extends Command
{
diff --git a/app/Console/Commands/MigrateOldData.php b/app/Console/Commands/MigrateOldData.php
index a34d2ef8..166be24c 100644
--- a/app/Console/Commands/MigrateOldData.php
+++ b/app/Console/Commands/MigrateOldData.php
@@ -20,8 +20,8 @@
namespace Poniverse\Ponyfm\Console\Commands;
-use Poniverse\Ponyfm\Image;
-use Poniverse\Ponyfm\ResourceLogItem;
+use Poniverse\Ponyfm\Models\Image;
+use Poniverse\Ponyfm\Models\ResourceLogItem;
use DB;
use Exception;
use Illuminate\Console\Command;
diff --git a/app/Console/Commands/PublishUnclassifiedMlpmaTracks.php b/app/Console/Commands/PublishUnclassifiedMlpmaTracks.php
index 215a354d..bf3095b5 100644
--- a/app/Console/Commands/PublishUnclassifiedMlpmaTracks.php
+++ b/app/Console/Commands/PublishUnclassifiedMlpmaTracks.php
@@ -23,8 +23,8 @@ namespace Poniverse\Ponyfm\Console\Commands;
use Carbon\Carbon;
use DB;
use Illuminate\Console\Command;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\TrackType;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\TrackType;
class PublishUnclassifiedMlpmaTracks extends Command
{
diff --git a/app/Console/Commands/RebuildArtists.php b/app/Console/Commands/RebuildArtists.php
index 3c540711..84e74d78 100644
--- a/app/Console/Commands/RebuildArtists.php
+++ b/app/Console/Commands/RebuildArtists.php
@@ -21,7 +21,7 @@
namespace Poniverse\Ponyfm\Console\Commands;
use Illuminate\Console\Command;
-use Poniverse\Ponyfm\User;
+use Poniverse\Ponyfm\Models\User;
class RebuildArtists extends Command
{
diff --git a/app/Console/Commands/RebuildFilesizes.php b/app/Console/Commands/RebuildFilesizes.php
index 8b0e99ae..e3236b9a 100644
--- a/app/Console/Commands/RebuildFilesizes.php
+++ b/app/Console/Commands/RebuildFilesizes.php
@@ -22,7 +22,7 @@ namespace Poniverse\Ponyfm\Console\Commands;
use File;
use Illuminate\Console\Command;
-use Poniverse\Ponyfm\TrackFile;
+use Poniverse\Ponyfm\Models\TrackFile;
class RebuildFilesizes extends Command
{
diff --git a/app/Console/Commands/RebuildTags.php b/app/Console/Commands/RebuildTags.php
index efdd9588..3898ed4a 100644
--- a/app/Console/Commands/RebuildTags.php
+++ b/app/Console/Commands/RebuildTags.php
@@ -20,7 +20,7 @@
namespace Poniverse\Ponyfm\Console\Commands;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Track;
use Illuminate\Console\Command;
class RebuildTags extends Command
diff --git a/app/Console/Commands/RebuildTrackCache.php b/app/Console/Commands/RebuildTrackCache.php
index 5b4386d1..67e4727d 100644
--- a/app/Console/Commands/RebuildTrackCache.php
+++ b/app/Console/Commands/RebuildTrackCache.php
@@ -24,8 +24,8 @@ use File;
use Illuminate\Console\Command;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Poniverse\Ponyfm\Jobs\EncodeTrackFile;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\TrackFile;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\TrackFile;
class RebuildTrackCache extends Command
{
diff --git a/app/Console/Commands/RefreshCache.php b/app/Console/Commands/RefreshCache.php
index 54e0360f..19b985f6 100644
--- a/app/Console/Commands/RefreshCache.php
+++ b/app/Console/Commands/RefreshCache.php
@@ -20,7 +20,7 @@
namespace Poniverse\Ponyfm\Console\Commands;
-use Poniverse\Ponyfm\ResourceLogItem;
+use Poniverse\Ponyfm\Models\ResourceLogItem;
use DB;
use Illuminate\Console\Command;
diff --git a/app/Http/Controllers/AlbumsController.php b/app/Http/Controllers/AlbumsController.php
index df372260..d966aa37 100644
--- a/app/Http/Controllers/AlbumsController.php
+++ b/app/Http/Controllers/AlbumsController.php
@@ -22,9 +22,9 @@ namespace Poniverse\Ponyfm\Http\Controllers;
use Poniverse\Ponyfm\AlbumDownloader;
use App;
-use Poniverse\Ponyfm\Album;
+use Poniverse\Ponyfm\Models\Album;
use Poniverse\Ponyfm\ResourceLogItem;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Track;
use Illuminate\Support\Facades\Redirect;
use View;
diff --git a/app/Http/Controllers/Api/Mobile/TracksController.php b/app/Http/Controllers/Api/Mobile/TracksController.php
index 96a70fd0..4f1a96f6 100644
--- a/app/Http/Controllers/Api/Mobile/TracksController.php
+++ b/app/Http/Controllers/Api/Mobile/TracksController.php
@@ -21,7 +21,7 @@
namespace Poniverse\Ponyfm\Http\Controllers\Api\Mobile;
use Poniverse\Ponyfm\Http\Controllers\Controller;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Track;
use Response;
class TracksController extends Controller
diff --git a/app/Http/Controllers/Api/V1/TracksController.php b/app/Http/Controllers/Api/V1/TracksController.php
index 9c1bd4cb..aeba018b 100644
--- a/app/Http/Controllers/Api/V1/TracksController.php
+++ b/app/Http/Controllers/Api/V1/TracksController.php
@@ -22,8 +22,8 @@ namespace Poniverse\Ponyfm\Http\Controllers\Api\V1;
use Poniverse\Ponyfm\Commands\UploadTrackCommand;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
-use Poniverse\Ponyfm\Image;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Image;
+use Poniverse\Ponyfm\Models\Track;
use Response;
class TracksController extends ApiControllerBase
diff --git a/app/Http/Controllers/Api/Web/AlbumsController.php b/app/Http/Controllers/Api/Web/AlbumsController.php
index 530a1992..fb61be53 100644
--- a/app/Http/Controllers/Api/Web/AlbumsController.php
+++ b/app/Http/Controllers/Api/Web/AlbumsController.php
@@ -22,18 +22,18 @@ namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Facades\File;
-use Poniverse\Ponyfm\Album;
+use Poniverse\Ponyfm\Models\Album;
use Poniverse\Ponyfm\Commands\CreateAlbumCommand;
use Poniverse\Ponyfm\Commands\DeleteAlbumCommand;
use Poniverse\Ponyfm\Commands\EditAlbumCommand;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
-use Poniverse\Ponyfm\Image;
+use Poniverse\Ponyfm\Models\Image;
use Poniverse\Ponyfm\Jobs\EncodeTrackFile;
-use Poniverse\Ponyfm\ResourceLogItem;
+use Poniverse\Ponyfm\Models\ResourceLogItem;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Track;
class AlbumsController extends ApiControllerBase
{
diff --git a/app/Http/Controllers/Api/Web/ArtistsController.php b/app/Http/Controllers/Api/Web/ArtistsController.php
index b54044ae..43f63f29 100644
--- a/app/Http/Controllers/Api/Web/ArtistsController.php
+++ b/app/Http/Controllers/Api/Web/ArtistsController.php
@@ -21,12 +21,12 @@
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use Poniverse\Ponyfm\Album;
-use Poniverse\Ponyfm\Comment;
-use Poniverse\Ponyfm\Favourite;
+use Poniverse\Ponyfm\Models\Comment;
+use Poniverse\Ponyfm\Models\Favourite;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
-use Poniverse\Ponyfm\Image;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\User;
+use Poniverse\Ponyfm\Models\Image;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\User;
use Cover;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Input;
@@ -59,10 +59,10 @@ class ArtistsController extends ApiControllerBase
$albums = [];
foreach ($favs as $fav) {
- if ($fav->type == 'Poniverse\Ponyfm\Track') {
+ if ($fav->type == 'Poniverse\Ponyfm\Models\Track') {
$tracks[] = Track::mapPublicTrackSummary($fav->track);
} else {
- if ($fav->type == 'Poniverse\Ponyfm\Album') {
+ if ($fav->type == 'Poniverse\Ponyfm\Models\Album') {
$albums[] = Album::mapPublicAlbumSummary($fav->album);
}
}
diff --git a/app/Http/Controllers/Api/Web/CommentsController.php b/app/Http/Controllers/Api/Web/CommentsController.php
index 9bbe7a0b..efbe16ac 100644
--- a/app/Http/Controllers/Api/Web/CommentsController.php
+++ b/app/Http/Controllers/Api/Web/CommentsController.php
@@ -22,7 +22,7 @@ namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App;
use Poniverse\Ponyfm\Commands\CreateCommentCommand;
-use Poniverse\Ponyfm\Comment;
+use Poniverse\Ponyfm\Models\Comment;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;
diff --git a/app/Http/Controllers/Api/Web/DashboardController.php b/app/Http/Controllers/Api/Web/DashboardController.php
index d90c1a6c..2ae700ac 100644
--- a/app/Http/Controllers/Api/Web/DashboardController.php
+++ b/app/Http/Controllers/Api/Web/DashboardController.php
@@ -21,7 +21,7 @@
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Track;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;
diff --git a/app/Http/Controllers/Api/Web/FavouritesController.php b/app/Http/Controllers/Api/Web/FavouritesController.php
index da412d76..e1eb59f0 100644
--- a/app/Http/Controllers/Api/Web/FavouritesController.php
+++ b/app/Http/Controllers/Api/Web/FavouritesController.php
@@ -20,12 +20,12 @@
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
-use Poniverse\Ponyfm\Album;
+use Poniverse\Ponyfm\Models\Album;
use Poniverse\Ponyfm\Commands\ToggleFavouriteCommand;
-use Poniverse\Ponyfm\Favourite;
+use Poniverse\Ponyfm\Models\Favourite;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
-use Poniverse\Ponyfm\Playlist;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Playlist;
+use Poniverse\Ponyfm\Models\Track;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;
diff --git a/app/Http/Controllers/Api/Web/GenresController.php b/app/Http/Controllers/Api/Web/GenresController.php
index 78710baa..1d00b956 100644
--- a/app/Http/Controllers/Api/Web/GenresController.php
+++ b/app/Http/Controllers/Api/Web/GenresController.php
@@ -23,7 +23,7 @@ namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use Input;
use Poniverse\Ponyfm\Commands\DeleteGenreCommand;
use Poniverse\Ponyfm\Commands\RenameGenreCommand;
-use Poniverse\Ponyfm\Genre;
+use Poniverse\Ponyfm\Models\Genre;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Response;
diff --git a/app/Http/Controllers/Api/Web/ImagesController.php b/app/Http/Controllers/Api/Web/ImagesController.php
index 09687024..a7071211 100644
--- a/app/Http/Controllers/Api/Web/ImagesController.php
+++ b/app/Http/Controllers/Api/Web/ImagesController.php
@@ -21,7 +21,7 @@
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
-use Poniverse\Ponyfm\Image;
+use Poniverse\Ponyfm\Models\Image;
use Cover;
use Illuminate\Support\Facades\Response;
diff --git a/app/Http/Controllers/Api/Web/PlaylistsController.php b/app/Http/Controllers/Api/Web/PlaylistsController.php
index aac920b3..e3b92e76 100644
--- a/app/Http/Controllers/Api/Web/PlaylistsController.php
+++ b/app/Http/Controllers/Api/Web/PlaylistsController.php
@@ -26,13 +26,13 @@ use Poniverse\Ponyfm\Commands\CreatePlaylistCommand;
use Poniverse\Ponyfm\Commands\DeletePlaylistCommand;
use Poniverse\Ponyfm\Commands\EditPlaylistCommand;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
-use Poniverse\Ponyfm\Image;
-use Poniverse\Ponyfm\Playlist;
-use Poniverse\Ponyfm\ResourceLogItem;
+use Poniverse\Ponyfm\Models\Image;
+use Poniverse\Ponyfm\Models\Playlist;
+use Poniverse\Ponyfm\Models\ResourceLogItem;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Track;
class PlaylistsController extends ApiControllerBase
{
diff --git a/app/Http/Controllers/Api/Web/TaxonomiesController.php b/app/Http/Controllers/Api/Web/TaxonomiesController.php
index a2107bf7..029556ed 100644
--- a/app/Http/Controllers/Api/Web/TaxonomiesController.php
+++ b/app/Http/Controllers/Api/Web/TaxonomiesController.php
@@ -20,11 +20,11 @@
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
-use Poniverse\Ponyfm\Genre;
+use Poniverse\Ponyfm\Models\Genre;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
-use Poniverse\Ponyfm\License;
-use Poniverse\Ponyfm\ShowSong;
-use Poniverse\Ponyfm\TrackType;
+use Poniverse\Ponyfm\Models\License;
+use Poniverse\Ponyfm\Models\ShowSong;
+use Poniverse\Ponyfm\Models\TrackType;
use Illuminate\Support\Facades\DB;
class TaxonomiesController extends ApiControllerBase
diff --git a/app/Http/Controllers/Api/Web/TracksController.php b/app/Http/Controllers/Api/Web/TracksController.php
index 78e27950..123387ec 100644
--- a/app/Http/Controllers/Api/Web/TracksController.php
+++ b/app/Http/Controllers/Api/Web/TracksController.php
@@ -29,8 +29,8 @@ use Poniverse\Ponyfm\Commands\UploadTrackCommand;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Poniverse\Ponyfm\Jobs\EncodeTrackFile;
use Poniverse\Ponyfm\ResourceLogItem;
-use Poniverse\Ponyfm\TrackFile;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\TrackFile;
+use Poniverse\Ponyfm\Models\Track;
use Auth;
use Input;
use Response;
diff --git a/app/Http/Controllers/ArtistsController.php b/app/Http/Controllers/ArtistsController.php
index 6ecebfed..2365c5a2 100644
--- a/app/Http/Controllers/ArtistsController.php
+++ b/app/Http/Controllers/ArtistsController.php
@@ -21,7 +21,7 @@
namespace Poniverse\Ponyfm\Http\Controllers;
use App;
-use Poniverse\Ponyfm\User;
+use Poniverse\Ponyfm\Models\User;
use View;
use Redirect;
diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php
index 13c1f8ee..3db072be 100644
--- a/app/Http/Controllers/AuthController.php
+++ b/app/Http/Controllers/AuthController.php
@@ -20,7 +20,7 @@
namespace Poniverse\Ponyfm\Http\Controllers;
-use Poniverse\Ponyfm\User;
+use Poniverse\Ponyfm\Models\User;
use Auth;
use Config;
use DB;
diff --git a/app/Http/Controllers/ImagesController.php b/app/Http/Controllers/ImagesController.php
index 15f8fc3f..7801c878 100644
--- a/app/Http/Controllers/ImagesController.php
+++ b/app/Http/Controllers/ImagesController.php
@@ -20,7 +20,7 @@
namespace Poniverse\Ponyfm\Http\Controllers;
-use Poniverse\Ponyfm\Image;
+use Poniverse\Ponyfm\Models\Image;
use Config;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Redirect;
diff --git a/app/Http/Controllers/PlaylistsController.php b/app/Http/Controllers/PlaylistsController.php
index 92655ae2..f0ea6a82 100644
--- a/app/Http/Controllers/PlaylistsController.php
+++ b/app/Http/Controllers/PlaylistsController.php
@@ -21,9 +21,9 @@
namespace Poniverse\Ponyfm\Http\Controllers;
use App;
-use Poniverse\Ponyfm\Playlist;
-use Poniverse\Ponyfm\ResourceLogItem;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Playlist;
+use Poniverse\Ponyfm\Models\ResourceLogItem;
+use Poniverse\Ponyfm\Models\Track;
use Poniverse\Ponyfm\PlaylistDownloader;
use Auth;
use Illuminate\Support\Facades\Redirect;
diff --git a/app/Http/Controllers/TracksController.php b/app/Http/Controllers/TracksController.php
index f56c5450..b51d388e 100644
--- a/app/Http/Controllers/TracksController.php
+++ b/app/Http/Controllers/TracksController.php
@@ -20,9 +20,9 @@
namespace Poniverse\Ponyfm\Http\Controllers;
-use Poniverse\Ponyfm\ResourceLogItem;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\TrackFile;
+use Poniverse\Ponyfm\Models\ResourceLogItem;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\TrackFile;
use Auth;
use Config;
use Illuminate\Support\Facades\App;
diff --git a/app/Http/Middleware/AuthenticateOAuth.php b/app/Http/Middleware/AuthenticateOAuth.php
index bd3c75a4..34ea5a8e 100644
--- a/app/Http/Middleware/AuthenticateOAuth.php
+++ b/app/Http/Middleware/AuthenticateOAuth.php
@@ -24,7 +24,7 @@ use Auth;
use Closure;
use GuzzleHttp;
use Poniverse;
-use Poniverse\Ponyfm\User;
+use Poniverse\Ponyfm\Models\User;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class AuthenticateOAuth
diff --git a/app/Jobs/DeleteGenre.php b/app/Jobs/DeleteGenre.php
index 5a518f1b..7e342ba5 100644
--- a/app/Jobs/DeleteGenre.php
+++ b/app/Jobs/DeleteGenre.php
@@ -21,11 +21,11 @@
namespace Poniverse\Ponyfm\Jobs;
use Auth;
-use Poniverse\Ponyfm\Genre;
+use Poniverse\Ponyfm\Models\Genre;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Bus\SelfHandling;
use Illuminate\Contracts\Queue\ShouldQueue;
-use Poniverse\Ponyfm\Track;
+use Poniverse\Ponyfm\Models\Track;
use SerializesModels;
class DeleteGenre extends Job implements SelfHandling, ShouldQueue
diff --git a/app/Jobs/EncodeTrackFile.php b/app/Jobs/EncodeTrackFile.php
index a54b68e7..276802e8 100644
--- a/app/Jobs/EncodeTrackFile.php
+++ b/app/Jobs/EncodeTrackFile.php
@@ -33,8 +33,8 @@ use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Bus\SelfHandling;
use Illuminate\Contracts\Queue\ShouldQueue;
-use Poniverse\Ponyfm\Track;
-use Poniverse\Ponyfm\TrackFile;
+use Poniverse\Ponyfm\Models\Track;
+use Poniverse\Ponyfm\Models\TrackFile;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;
diff --git a/app/Library/PFMAuth.php b/app/Library/PFMAuth.php
index d5e98417..af68f278 100644
--- a/app/Library/PFMAuth.php
+++ b/app/Library/PFMAuth.php
@@ -40,6 +40,6 @@ class PFMAuth extends EloquentUserProvider
{
function __construct()
{
- parent::__construct(new NullHasher(), 'Poniverse\Ponyfm\User');
+ parent::__construct(new NullHasher(), 'Poniverse\Ponyfm\Models\User');
}
}
diff --git a/app/Album.php b/app/Models/Album.php
similarity index 95%
rename from app/Album.php
rename to app/Models/Album.php
index 5530ce61..45025d66 100644
--- a/app/Album.php
+++ b/app/Models/Album.php
@@ -18,7 +18,7 @@
* along with this program. If not, see