Updated Pony.fm's PHP namespace to Poniverse\Ponyfm.

This commit is contained in:
Peter Deltchev 2015-10-23 18:22:14 -07:00
parent e593d07411
commit a4c24a7d64
97 changed files with 276 additions and 276 deletions

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Exception;
use Illuminate\Database\Eloquent\Model;
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\URL;
use App\Traits\SlugTrait;
use Poniverse\Ponyfm\Traits\SlugTrait;
use Helpers;
class Album extends Model
@ -40,32 +40,32 @@ class Album extends Model
public function user()
{
return $this->belongsTo('App\User');
return $this->belongsTo('Poniverse\Ponyfm\User');
}
public function users()
{
return $this->hasMany('App\ResourceUser');
return $this->hasMany('Poniverse\Ponyfm\ResourceUser');
}
public function favourites()
{
return $this->hasMany('App\Favourite');
return $this->hasMany('Poniverse\Ponyfm\Favourite');
}
public function cover()
{
return $this->belongsTo('App\Image');
return $this->belongsTo('Poniverse\Ponyfm\Image');
}
public function tracks()
{
return $this->hasMany('App\Track')->orderBy('track_number', 'asc');
return $this->hasMany('Poniverse\Ponyfm\Track')->orderBy('track_number', 'asc');
}
public function comments()
{
return $this->hasMany('App\Comment')->orderBy('created_at', 'desc');
return $this->hasMany('Poniverse\Ponyfm\Comment')->orderBy('created_at', 'desc');
}
public static function mapPublicAlbumShow($album)

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use ZipStream;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Playlist;
use App\Track;
use Poniverse\Ponyfm\Playlist;
use Poniverse\Ponyfm\Track;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
abstract class CommandBase
{

View file

@ -1,6 +1,6 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use Illuminate\Validation\Validator;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Album;
use App\Image;
use Poniverse\Ponyfm\Album;
use Poniverse\Ponyfm\Image;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;

View file

@ -1,12 +1,12 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Album;
use App\Comment;
use App\Playlist;
use App\Track;
use App\User;
use Poniverse\Ponyfm\Album;
use Poniverse\Ponyfm\Comment;
use Poniverse\Ponyfm\Playlist;
use Poniverse\Ponyfm\Track;
use Poniverse\Ponyfm\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;

View file

@ -1,8 +1,8 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Playlist;
use Poniverse\Ponyfm\Playlist;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;

View file

@ -1,8 +1,8 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Album;
use Poniverse\Ponyfm\Album;
use Illuminate\Support\Facades\Auth;
class DeleteAlbumCommand extends CommandBase

View file

@ -1,8 +1,8 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Playlist;
use Poniverse\Ponyfm\Playlist;
use Illuminate\Support\Facades\Auth;
class DeletePlaylistCommand extends CommandBase

View file

@ -1,8 +1,8 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Track;
use Poniverse\Ponyfm\Track;
class DeleteTrackCommand extends CommandBase
{

View file

@ -1,9 +1,9 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Album;
use App\Image;
use Poniverse\Ponyfm\Album;
use Poniverse\Ponyfm\Image;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\PinnedPlaylist;
use App\Playlist;
use Poniverse\Ponyfm\PinnedPlaylist;
use Poniverse\Ponyfm\Playlist;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;

View file

@ -1,11 +1,11 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Album;
use App\Image;
use App\Track;
use App\User;
use Poniverse\Ponyfm\Album;
use Poniverse\Ponyfm\Image;
use Poniverse\Ponyfm\Track;
use Poniverse\Ponyfm\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;

View file

@ -1,8 +1,8 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Image;
use Poniverse\Ponyfm\Image;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Favourite;
use App\ResourceUser;
use Poniverse\Ponyfm\Favourite;
use Poniverse\Ponyfm\ResourceUser;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Follower;
use App\ResourceUser;
use Poniverse\Ponyfm\Follower;
use Poniverse\Ponyfm\ResourceUser;
use Illuminate\Support\Facades\Auth;
class ToggleFollowingCommand extends CommandBase

View file

@ -1,9 +1,9 @@
<?php
namespace App\Commands;
namespace Poniverse\Ponyfm\Commands;
use App\Track;
use App\TrackFile;
use Poniverse\Ponyfm\Track;
use Poniverse\Ponyfm\TrackFile;
use AudioCache;
use File;
use Illuminate\Support\Facades\Log;

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
@ -16,27 +16,27 @@ class Comment extends Model
public function user()
{
return $this->belongsTo('App\User');
return $this->belongsTo('Poniverse\Ponyfm\User');
}
public function track()
{
return $this->belongsTo('App\Track');
return $this->belongsTo('Poniverse\Ponyfm\Track');
}
public function album()
{
return $this->belongsTo('App\Album');
return $this->belongsTo('Poniverse\Ponyfm\Album');
}
public function playlist()
{
return $this->belongsTo('App\Playlist');
return $this->belongsTo('Poniverse\Ponyfm\Playlist');
}
public function profile()
{
return $this->belongsTo('App\User', 'profile_id');
return $this->belongsTo('Poniverse\Ponyfm\User', 'profile_id');
}
public static function mapPublic($comment)

View file

@ -1,6 +1,6 @@
<?php
namespace App\Console\Commands;
namespace Poniverse\Ponyfm\Console\Commands;
use Illuminate\Console\Command;

View file

@ -1,10 +1,10 @@
<?php
namespace App\Console\Commands;
namespace Poniverse\Ponyfm\Console\Commands;
use App\ShowSong;
use App\Track;
use App\TrackType;
use Poniverse\Ponyfm\ShowSong;
use Poniverse\Ponyfm\Track;
use Poniverse\Ponyfm\TrackType;
use DB;
use Illuminate\Console\Command;
use Illuminate\Support\Str;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Console\Commands;
namespace Poniverse\Ponyfm\Console\Commands;
use Carbon\Carbon;
use App\ResourceLogItem;
use Poniverse\Ponyfm\ResourceLogItem;
use Illuminate\Console\Command;
class FixYearZeroLogs extends Command

View file

@ -1,13 +1,13 @@
<?php
namespace App\Console\Commands;
namespace Poniverse\Ponyfm\Console\Commands;
use App\Album;
use App\Commands\UploadTrackCommand;
use App\Genre;
use App\Image;
use App\Track;
use App\User;
use Poniverse\Ponyfm\Album;
use Poniverse\Ponyfm\Commands\UploadTrackCommand;
use Poniverse\Ponyfm\Genre;
use Poniverse\Ponyfm\Image;
use Poniverse\Ponyfm\Track;
use Poniverse\Ponyfm\User;
use Auth;
use Carbon\Carbon;
use Config;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Console\Commands;
namespace Poniverse\Ponyfm\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Console\Commands;
namespace Poniverse\Ponyfm\Console\Commands;
use App\Image;
use App\ResourceLogItem;
use Poniverse\Ponyfm\Image;
use Poniverse\Ponyfm\ResourceLogItem;
use DB;
use Exception;
use Illuminate\Console\Command;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Console\Commands;
namespace Poniverse\Ponyfm\Console\Commands;
use GuzzleHttp\Exception\ClientException;
use Illuminate\Console\Command;

View file

@ -1,8 +1,8 @@
<?php
namespace App\Console\Commands;
namespace Poniverse\Ponyfm\Console\Commands;
use App\Track;
use Poniverse\Ponyfm\Track;
use Illuminate\Console\Command;
class RebuildTags extends Command

View file

@ -1,8 +1,8 @@
<?php
namespace App\Console\Commands;
namespace Poniverse\Ponyfm\Console\Commands;
use App\ResourceLogItem;
use Poniverse\Ponyfm\ResourceLogItem;
use DB;
use Illuminate\Console\Command;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Console;
namespace Poniverse\Ponyfm\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
@ -13,14 +13,14 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected $commands = [
\App\Console\Commands\MigrateOldData::class,
\App\Console\Commands\RefreshCache::class,
\App\Console\Commands\ImportMLPMA::class,
\App\Console\Commands\ClassifyMLPMA::class,
\App\Console\Commands\RebuildTags::class,
\App\Console\Commands\FixYearZeroLogs::class,
\App\Console\Commands\BootstrapLocalEnvironment::class,
\App\Console\Commands\PoniverseApiSetup::class,
\Poniverse\Ponyfm\Console\Commands\MigrateOldData::class,
\Poniverse\Ponyfm\Console\Commands\RefreshCache::class,
\Poniverse\Ponyfm\Console\Commands\ImportMLPMA::class,
\Poniverse\Ponyfm\Console\Commands\ClassifyMLPMA::class,
\Poniverse\Ponyfm\Console\Commands\RebuildTags::class,
\Poniverse\Ponyfm\Console\Commands\FixYearZeroLogs::class,
\Poniverse\Ponyfm\Console\Commands\BootstrapLocalEnvironment::class,
\Poniverse\Ponyfm\Console\Commands\PoniverseApiSetup::class,
];
/**

View file

@ -1,6 +1,6 @@
<?php
namespace App\Events;
namespace Poniverse\Ponyfm\Events;
abstract class Event
{

View file

@ -1,6 +1,6 @@
<?php
namespace App\Exceptions;
namespace Poniverse\Ponyfm\Exceptions;
use Exception;
use Symfony\Component\HttpKernel\Exception\HttpException;

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Illuminate\Database\Eloquent\Model;
@ -17,22 +17,22 @@ class Favourite extends Model
public function user()
{
return $this->belongsTo('App\User');
return $this->belongsTo('Poniverse\Ponyfm\User');
}
public function track()
{
return $this->belongsTo('App\Track');
return $this->belongsTo('Poniverse\Ponyfm\Track');
}
public function album()
{
return $this->belongsTo('App\Album');
return $this->belongsTo('Poniverse\Ponyfm\Album');
}
public function playlist()
{
return $this->belongsTo('App\Playlist');
return $this->belongsTo('Poniverse\Ponyfm\Playlist');
}
/**

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Illuminate\Database\Eloquent\Model;

View file

@ -1,8 +1,8 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use App\Traits\SlugTrait;
use Poniverse\Ponyfm\Traits\SlugTrait;
use Illuminate\Database\Eloquent\Model;
class Genre extends Model

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Redirect;

View file

@ -1,12 +1,12 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use App\AlbumDownloader;
use Poniverse\Ponyfm\AlbumDownloader;
use App;
use App\Album;
use App\ResourceLogItem;
use App\Track;
use Poniverse\Ponyfm\Album;
use Poniverse\Ponyfm\ResourceLogItem;
use Poniverse\Ponyfm\Track;
use Illuminate\Support\Facades\Redirect;
use View;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Http\Controllers\Api\Mobile;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Mobile;
use App\Http\Controllers\Controller;
use App\Track;
use Poniverse\Ponyfm\Http\Controllers\Controller;
use Poniverse\Ponyfm\Track;
use Response;
class TracksController extends Controller

View file

@ -1,9 +1,9 @@
<?php
namespace App\Http\Controllers\Api\V1;
namespace Poniverse\Ponyfm\Http\Controllers\Api\V1;
use App\Image;
use App\Track;
use Poniverse\Ponyfm\Image;
use Poniverse\Ponyfm\Track;
use Cover;
use Illuminate\Support\Facades\Response;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Http\Controllers\ApiControllerBase;
use App\Commands\SaveAccountSettingsCommand;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Poniverse\Ponyfm\Commands\SaveAccountSettingsCommand;
use Cover;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;

View file

@ -1,14 +1,14 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Album;
use App\Commands\CreateAlbumCommand;
use App\Commands\DeleteAlbumCommand;
use App\Commands\EditAlbumCommand;
use App\Http\Controllers\ApiControllerBase;
use App\Image;
use App\ResourceLogItem;
use Poniverse\Ponyfm\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\ResourceLogItem;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;

View file

@ -1,14 +1,14 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Album;
use App\Comment;
use App\Favourite;
use App\Http\Controllers\ApiControllerBase;
use App\Image;
use App\Track;
use App\User;
use Poniverse\Ponyfm\Album;
use Poniverse\Ponyfm\Comment;
use Poniverse\Ponyfm\Favourite;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Poniverse\Ponyfm\Image;
use Poniverse\Ponyfm\Track;
use Poniverse\Ponyfm\User;
use Cover;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Input;
@ -41,10 +41,10 @@ class ArtistsController extends ApiControllerBase
$albums = [];
foreach ($favs as $fav) {
if ($fav->type == 'App\Track') {
if ($fav->type == 'Poniverse\Ponyfm\Track') {
$tracks[] = Track::mapPublicTrackSummary($fav->track);
} else {
if ($fav->type == 'App\Album') {
if ($fav->type == 'Poniverse\Ponyfm\Album') {
$albums[] = Album::mapPublicAlbumSummary($fav->album);
}
}

View file

@ -1,8 +1,8 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Http\Controllers\Controller;
use Poniverse\Ponyfm\Http\Controllers\Controller;
class AuthController extends Controller
{

View file

@ -1,11 +1,11 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App;
use App\Commands\CreateCommentCommand;
use App\Comment;
use App\Http\Controllers\ApiControllerBase;
use Poniverse\Ponyfm\Commands\CreateCommentCommand;
use Poniverse\Ponyfm\Comment;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Http\Controllers\ApiControllerBase;
use App\Track;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Poniverse\Ponyfm\Track;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;

View file

@ -1,13 +1,13 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Album;
use App\Commands\ToggleFavouriteCommand;
use App\Favourite;
use App\Http\Controllers\ApiControllerBase;
use App\Playlist;
use App\Track;
use Poniverse\Ponyfm\Album;
use Poniverse\Ponyfm\Commands\ToggleFavouriteCommand;
use Poniverse\Ponyfm\Favourite;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Poniverse\Ponyfm\Playlist;
use Poniverse\Ponyfm\Track;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Commands\ToggleFollowingCommand;
use App\Http\Controllers\ApiControllerBase;
use Poniverse\Ponyfm\Commands\ToggleFollowingCommand;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Illuminate\Support\Facades\Input;
class FollowController extends ApiControllerBase

View file

@ -1,9 +1,9 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Http\Controllers\ApiControllerBase;
use App\Image;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Poniverse\Ponyfm\Image;
use Cover;
use Illuminate\Support\Facades\Response;

View file

@ -1,15 +1,15 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Commands\AddTrackToPlaylistCommand;
use App\Commands\CreatePlaylistCommand;
use App\Commands\DeletePlaylistCommand;
use App\Commands\EditPlaylistCommand;
use App\Http\Controllers\ApiControllerBase;
use App\Image;
use App\Playlist;
use App\ResourceLogItem;
use Poniverse\Ponyfm\Commands\AddTrackToPlaylistCommand;
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 Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Response;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Http\Controllers\Controller;
use App\ProfileRequest;
use Poniverse\Ponyfm\Http\Controllers\Controller;
use Poniverse\Ponyfm\ProfileRequest;
use Cache;
use Config;
use Response;

View file

@ -1,12 +1,12 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Genre;
use App\Http\Controllers\ApiControllerBase;
use App\License;
use App\ShowSong;
use App\TrackType;
use Poniverse\Ponyfm\Genre;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Poniverse\Ponyfm\License;
use Poniverse\Ponyfm\ShowSong;
use Poniverse\Ponyfm\TrackType;
use Illuminate\Support\Facades\DB;
class TaxonomiesController extends ApiControllerBase

View file

@ -1,13 +1,13 @@
<?php
namespace App\Http\Controllers\Api\Web;
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
use App\Commands\DeleteTrackCommand;
use App\Commands\EditTrackCommand;
use App\Commands\UploadTrackCommand;
use App\Http\Controllers\ApiControllerBase;
use App\ResourceLogItem;
use App\Track;
use Poniverse\Ponyfm\Commands\DeleteTrackCommand;
use Poniverse\Ponyfm\Commands\EditTrackCommand;
use Poniverse\Ponyfm\Commands\UploadTrackCommand;
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
use Poniverse\Ponyfm\ResourceLogItem;
use Poniverse\Ponyfm\Track;
use Cover;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use Response;

View file

@ -1,9 +1,9 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use App;
use App\User;
use Poniverse\Ponyfm\User;
use View;
use Redirect;

View file

@ -1,8 +1,8 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use App\User;
use Poniverse\Ponyfm\User;
use Auth;
use Config;
use DB;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use View;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use View;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use View;

View file

@ -1,8 +1,8 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use App\Image;
use Poniverse\Ponyfm\Image;
use Config;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Redirect;

View file

@ -1,12 +1,12 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use App;
use App\Playlist;
use App\ResourceLogItem;
use App\Track;
use App\PlaylistDownloader;
use Poniverse\Ponyfm\Playlist;
use Poniverse\Ponyfm\ResourceLogItem;
use Poniverse\Ponyfm\Track;
use Poniverse\Ponyfm\PlaylistDownloader;
use Auth;
use Illuminate\Support\Facades\Redirect;
use View;

View file

@ -1,10 +1,10 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use App\ResourceLogItem;
use App\Track;
use App\TrackFile;
use Poniverse\Ponyfm\ResourceLogItem;
use Poniverse\Ponyfm\Track;
use Poniverse\Ponyfm\TrackFile;
use Auth;
use Config;
use Illuminate\Support\Facades\App;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use View;

View file

@ -1,8 +1,8 @@
<?php
namespace App\Http\Controllers;
namespace Poniverse\Ponyfm\Http\Controllers;
use App\User;
use Poniverse\Ponyfm\User;
use File;
use Illuminate\Support\Facades\App;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http;
namespace Poniverse\Ponyfm\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
@ -13,12 +13,12 @@ class Kernel extends HttpKernel
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\App\Http\Middleware\EncryptCookies::class,
\Poniverse\Ponyfm\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\Profiler::class,
\Poniverse\Ponyfm\Http\Middleware\VerifyCsrfToken::class,
\Poniverse\Ponyfm\Http\Middleware\Profiler::class,
];
/**
@ -27,9 +27,9 @@ class Kernel extends HttpKernel
* @var array
*/
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth' => \Poniverse\Ponyfm\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'csrf' => \App\Http\Middleware\VerifyCsrfHeader::class,
'guest' => \Poniverse\Ponyfm\Http\Middleware\RedirectIfAuthenticated::class,
'csrf' => \Poniverse\Ponyfm\Http\Middleware\VerifyCsrfHeader::class,
];
}

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Middleware;
namespace Poniverse\Ponyfm\Http\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Guard;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Middleware;
namespace Poniverse\Ponyfm\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Middleware;
namespace Poniverse\Ponyfm\Http\Middleware;
use App;
use Closure;
@ -8,7 +8,7 @@ use Cache;
use Config;
use DB;
use Log;
use App\ProfileRequest;
use Poniverse\Ponyfm\ProfileRequest;
use Symfony\Component\HttpFoundation\Response;
class Profiler

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Middleware;
namespace Poniverse\Ponyfm\Http\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Guard;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Middleware;
namespace Poniverse\Ponyfm\Http\Middleware;
use Closure;
use Illuminate\Session\TokenMismatchException;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Middleware;
namespace Poniverse\Ponyfm\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Http\Requests;
namespace Poniverse\Ponyfm\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use External;
use Illuminate\Database\Eloquent\Model;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Jobs;
namespace Poniverse\Ponyfm\Jobs;
use Illuminate\Bus\Queueable;

View file

@ -21,6 +21,6 @@ class PFMAuth extends EloquentUserProvider
{
function __construct()
{
parent::__construct(new NullHasher(), 'App\User');
parent::__construct(new NullHasher(), 'Poniverse\Ponyfm\User');
}
}

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Illuminate\Database\Eloquent\Model;

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Illuminate\Database\Eloquent\Model;
@ -10,11 +10,11 @@ class PinnedPlaylist extends Model
public function user()
{
return $this->belongsTo('App\User');
return $this->belongsTo('Poniverse\Ponyfm\User');
}
public function playlist()
{
return $this->belongsTo('App\Playlist');
return $this->belongsTo('Poniverse\Ponyfm\Playlist');
}
}

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Helpers;
use Illuminate\Database\Eloquent\Model;
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\URL;
use App\Traits\SlugTrait;
use Poniverse\Ponyfm\Traits\SlugTrait;
class Playlist extends Model
{
@ -127,7 +127,7 @@ class Playlist extends Model
public function tracks()
{
return $this
->belongsToMany('App\Track')
->belongsToMany('Poniverse\Ponyfm\Track')
->withPivot('position')
->withTimestamps()
->orderBy('position', 'asc');
@ -135,22 +135,22 @@ class Playlist extends Model
public function users()
{
return $this->hasMany('App\ResourceUser');
return $this->hasMany('Poniverse\Ponyfm\ResourceUser');
}
public function comments()
{
return $this->hasMany('App\Comment')->orderBy('created_at', 'desc');
return $this->hasMany('Poniverse\Ponyfm\Comment')->orderBy('created_at', 'desc');
}
public function pins()
{
return $this->hasMany('App\PinnedPlaylist');
return $this->hasMany('Poniverse\Ponyfm\PinnedPlaylist');
}
public function user()
{
return $this->belongsTo('App\User');
return $this->belongsTo('Poniverse\Ponyfm\User');
}
public function hasPinFor($userId)

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use ZipStream;

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use DB;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Providers;
namespace Poniverse\Ponyfm\Providers;
use App;
use Auth;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Providers;
namespace Poniverse\Ponyfm\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
@ -13,8 +13,8 @@ class EventServiceProvider extends ServiceProvider
* @var array
*/
protected $listen = [
'App\Events\SomeEvent' => [
'App\Listeners\EventListener',
'Poniverse\Ponyfm\Events\SomeEvent' => [
'Poniverse\Ponyfm\Listeners\EventListener',
],
];

View file

@ -1,6 +1,6 @@
<?php
namespace App\Providers;
namespace Poniverse\Ponyfm\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
@ -14,7 +14,7 @@ class RouteServiceProvider extends ServiceProvider
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
protected $namespace = 'Poniverse\Ponyfm\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Illuminate\Database\Eloquent\Model;

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Illuminate\Database\Eloquent\Model;

View file

@ -1,8 +1,8 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use App\Traits\SlugTrait;
use Poniverse\Ponyfm\Traits\SlugTrait;
use Exception;
use External;
use getid3_writetags;
@ -332,52 +332,52 @@ class Track extends Model
public function genre()
{
return $this->belongsTo('App\Genre');
return $this->belongsTo('Poniverse\Ponyfm\Genre');
}
public function trackType()
{
return $this->belongsTo('App\TrackType', 'track_type_id');
return $this->belongsTo('Poniverse\Ponyfm\TrackType', 'track_type_id');
}
public function comments()
{
return $this->hasMany('App\Comment')->orderBy('created_at', 'desc');
return $this->hasMany('Poniverse\Ponyfm\Comment')->orderBy('created_at', 'desc');
}
public function favourites()
{
return $this->hasMany('App\Favourite');
return $this->hasMany('Poniverse\Ponyfm\Favourite');
}
public function cover()
{
return $this->belongsTo('App\Image');
return $this->belongsTo('Poniverse\Ponyfm\Image');
}
public function showSongs()
{
return $this->belongsToMany('App\ShowSong');
return $this->belongsToMany('Poniverse\Ponyfm\ShowSong');
}
public function users()
{
return $this->hasMany('App\ResourceUser');
return $this->hasMany('Poniverse\Ponyfm\ResourceUser');
}
public function user()
{
return $this->belongsTo('App\User');
return $this->belongsTo('Poniverse\Ponyfm\User');
}
public function album()
{
return $this->belongsTo('App\Album');
return $this->belongsTo('Poniverse\Ponyfm\Album');
}
public function trackFiles()
{
return $this->hasMany('App\TrackFile');
return $this->hasMany('Poniverse\Ponyfm\TrackFile');
}
public function getYearAttribute()

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Helpers;
use Illuminate\Database\Eloquent\Model;
@ -12,7 +12,7 @@ class TrackFile extends Model
{
public function track()
{
return $this->belongsTo('App\Track');
return $this->belongsTo('Poniverse\Ponyfm\Track');
}
/**

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Illuminate\Database\Eloquent\Model;

View file

@ -1,6 +1,6 @@
<?php
namespace App\Traits;
namespace Poniverse\Ponyfm\Traits;
use Illuminate\Support\Str;

View file

@ -1,6 +1,6 @@
<?php
namespace App;
namespace Poniverse\Ponyfm;
use Exception;
use Gravatar;
@ -35,17 +35,17 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
public function avatar()
{
return $this->belongsTo('App\Image');
return $this->belongsTo('Poniverse\Ponyfm\Image');
}
public function users()
{
return $this->hasMany('App\ResourceUser', 'artist_id');
return $this->hasMany('Poniverse\Ponyfm\ResourceUser', 'artist_id');
}
public function comments()
{
return $this->hasMany('App\Comment', 'profile_id')->orderBy('created_at', 'desc');
return $this->hasMany('Poniverse\Ponyfm\Comment', 'profile_id')->orderBy('created_at', 'desc');
}
public function getIsArchivedAttribute()

View file

@ -28,17 +28,17 @@ $app = new Illuminate\Foundation\Application(
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
Poniverse\Ponyfm\Http\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
Poniverse\Ponyfm\Console\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
Poniverse\Ponyfm\Exceptions\Handler::class
);
/*

View file

@ -25,7 +25,7 @@
"app/Library"
],
"psr-4": {
"App\\": "app/"
"Poniverse\\Ponyfm\\": "app/"
}
},
"autoload-dev": {

View file

@ -140,9 +140,9 @@ return [
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
Poniverse\Ponyfm\Providers\AppServiceProvider::class,
Poniverse\Ponyfm\Providers\EventServiceProvider::class,
Poniverse\Ponyfm\Providers\RouteServiceProvider::class,
Intouch\LaravelNewrelic\NewrelicServiceProvider::class,
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,

View file

@ -28,7 +28,7 @@ return [
|
*/
'model' => App\User::class,
'model' => Poniverse\Ponyfm\User::class,
/*
|--------------------------------------------------------------------------

View file

@ -30,7 +30,7 @@ return [
],
'stripe' => [
'model' => App\User::class,
'model' => Poniverse\Ponyfm\User::class,
'key' => '',
'secret' => '',
],

View file

@ -11,7 +11,7 @@
|
*/
$factory->define(App\User::class, function ($faker) {
$factory->define(Poniverse\Ponyfm\User::class, function ($faker) {
return [
'name' => $faker->name,
'email' => $faker->email,

View file

@ -1,5 +1,5 @@
suites:
main:
namespace: App
psr4_prefix: App
namespace: Poniverse\Ponyfm
psr4_prefix: Poniverse\Ponyfm
src_path: app