mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-02-12 08:26:44 +01:00
Merge pull request #147 from Poniverse/shift-40778
This commit is contained in:
commit
bcc42c397b
19 changed files with 706 additions and 418 deletions
|
@ -8,6 +8,7 @@ use App\Models\Track;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Session\Store;
|
use Illuminate\Session\Store;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
class AlexaController extends Controller
|
class AlexaController extends Controller
|
||||||
|
@ -146,7 +147,7 @@ class AlexaController extends Controller
|
||||||
|
|
||||||
public function play()
|
public function play()
|
||||||
{
|
{
|
||||||
$track = array_first(Track::popular(1));
|
$track = Arr::first(Track::popular(1));
|
||||||
|
|
||||||
$this->session->put('current_position', 1);
|
$this->session->put('current_position', 1);
|
||||||
$this->session->put('track_id', $track['id']);
|
$this->session->put('track_id', $track['id']);
|
||||||
|
|
|
@ -28,6 +28,7 @@ use Cache;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use DB;
|
use DB;
|
||||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
use Response;
|
use Response;
|
||||||
|
|
||||||
class StatsController extends ApiControllerBase
|
class StatsController extends ApiControllerBase
|
||||||
|
@ -87,12 +88,12 @@ class StatsController extends ApiControllerBase
|
||||||
foreach ($playsArray as $timeOffet => $plays) {
|
foreach ($playsArray as $timeOffet => $plays) {
|
||||||
if ($hourly) {
|
if ($hourly) {
|
||||||
$set = [
|
$set = [
|
||||||
'hours' => $timeOffet.' '.str_plural('hour', $timeOffet),
|
'hours' => $timeOffet.' '.Str::plural('hour', $timeOffet),
|
||||||
'plays' => $plays,
|
'plays' => $plays,
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$set = [
|
$set = [
|
||||||
'days' => $timeOffet.' '.str_plural('day', $timeOffet),
|
'days' => $timeOffet.' '.Str::plural('day', $timeOffet),
|
||||||
'plays' => $plays,
|
'plays' => $plays,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -108,7 +109,7 @@ class StatsController extends ApiControllerBase
|
||||||
|
|
||||||
public function getTrackStats($id)
|
public function getTrackStats($id)
|
||||||
{
|
{
|
||||||
$cachedOutput = Cache::remember('track_stats'.$id, 5, function () use ($id) {
|
$cachedOutput = Cache::remember('track_stats'.$id, 300, function () use ($id) {
|
||||||
try {
|
try {
|
||||||
$track = Track::published()->findOrFail($id);
|
$track = Track::published()->findOrFail($id);
|
||||||
} catch (ModelNotFoundException $e) {
|
} catch (ModelNotFoundException $e) {
|
||||||
|
|
|
@ -93,7 +93,6 @@ class Album extends Model implements Searchable, Commentable, Favouritable
|
||||||
|
|
||||||
protected $elasticsearchType = 'album';
|
protected $elasticsearchType = 'album';
|
||||||
|
|
||||||
protected $dates = ['deleted_at'];
|
|
||||||
protected $fillable = ['user_id', 'title', 'slug'];
|
protected $fillable = ['user_id', 'title', 'slug'];
|
||||||
|
|
||||||
public static function summary()
|
public static function summary()
|
||||||
|
|
|
@ -72,8 +72,6 @@ class Comment extends Model
|
||||||
|
|
||||||
protected $table = 'comments';
|
protected $table = 'comments';
|
||||||
|
|
||||||
protected $dates = ['deleted_at'];
|
|
||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(User::class);
|
return $this->belongsTo(User::class);
|
||||||
|
|
|
@ -95,7 +95,7 @@ class Playlist extends Model implements Searchable, Commentable, Favouritable
|
||||||
protected $elasticsearchType = 'playlist';
|
protected $elasticsearchType = 'playlist';
|
||||||
|
|
||||||
protected $table = 'playlists';
|
protected $table = 'playlists';
|
||||||
protected $dates = ['deleted_at'];
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'id' => 'integer',
|
'id' => 'integer',
|
||||||
'user_id' => 'integer',
|
'user_id' => 'integer',
|
||||||
|
|
|
@ -152,7 +152,9 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
||||||
|
|
||||||
protected $elasticsearchType = 'track';
|
protected $elasticsearchType = 'track';
|
||||||
|
|
||||||
protected $dates = ['deleted_at', 'published_at', 'released_at'];
|
protected $dates = [
|
||||||
|
'published_at', 'released_at',
|
||||||
|
];
|
||||||
protected $hidden = ['original_tags', 'metadata'];
|
protected $hidden = ['original_tags', 'metadata'];
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'id' => 'integer',
|
'id' => 'integer',
|
||||||
|
@ -385,7 +387,7 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
||||||
{
|
{
|
||||||
$trackData = Cache::remember(
|
$trackData = Cache::remember(
|
||||||
'popular_tracks'.$count.'-'.($allowExplicit ? 'explicit' : 'safe'),
|
'popular_tracks'.$count.'-'.($allowExplicit ? 'explicit' : 'safe'),
|
||||||
5,
|
300,
|
||||||
function () use ($allowExplicit, $count, $skip) {
|
function () use ($allowExplicit, $count, $skip) {
|
||||||
/*$query = static
|
/*$query = static
|
||||||
::published()
|
::published()
|
||||||
|
|
|
@ -170,7 +170,7 @@ trait TrackCollection
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Cache::remember($this->getCacheKey('filesize-'.$format), 1440, function () use ($tracks, $format) {
|
return Cache::remember($this->getCacheKey('filesize-'.$format), 86400, function () use ($tracks, $format) {
|
||||||
$size = 0;
|
$size = 0;
|
||||||
|
|
||||||
// Check whether the format is lossless yet not all master files are lossless
|
// Check whether the format is lossless yet not all master files are lossless
|
||||||
|
|
|
@ -11,13 +11,13 @@
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3",
|
"php": "^7.1.3",
|
||||||
"laravel/framework": "5.7.*",
|
"laravel/framework": "5.8.*",
|
||||||
"codescale/ffmpeg-php": "2.7.0",
|
"codescale/ffmpeg-php": "2.7.0",
|
||||||
"barryvdh/laravel-ide-helper": "v2.8.0",
|
"barryvdh/laravel-ide-helper": "v2.8.0",
|
||||||
"guzzlehttp/guzzle": "~6.0",
|
"guzzlehttp/guzzle": "~6.0",
|
||||||
"doctrine/dbal": "2.5.*",
|
"doctrine/dbal": "2.5.*",
|
||||||
"venturecraft/revisionable": "^1.36",
|
"venturecraft/revisionable": "^1.36",
|
||||||
"pda/pheanstalk": "~3.0",
|
"pda/pheanstalk": "~v4.0.0",
|
||||||
"cviebrock/laravel-elasticsearch": "4.0.0",
|
"cviebrock/laravel-elasticsearch": "4.0.0",
|
||||||
"barryvdh/laravel-debugbar": "~3.4",
|
"barryvdh/laravel-debugbar": "~3.4",
|
||||||
"predis/predis": "^1.0",
|
"predis/predis": "^1.0",
|
||||||
|
@ -31,19 +31,19 @@
|
||||||
"doctrine/collections": "v1.4.*",
|
"doctrine/collections": "v1.4.*",
|
||||||
"doctrine/annotations": "v1.4.*",
|
"doctrine/annotations": "v1.4.*",
|
||||||
"doctrine/cache": "v1.6.*",
|
"doctrine/cache": "v1.6.*",
|
||||||
"doctrine/instantiator": "1.0.*",
|
"doctrine/instantiator": "^1.1",
|
||||||
"fideloper/proxy": "^4.0"
|
"fideloper/proxy": "^4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "^1.4",
|
"fzaninotto/faker": "^1.4",
|
||||||
"mockery/mockery": "^1.0",
|
"mockery/mockery": "^1.0",
|
||||||
"phpunit/phpunit": "^7.0",
|
"phpunit/phpunit": "^7.5",
|
||||||
"filp/whoops": "^2.0",
|
"filp/whoops": "^2.0",
|
||||||
"symfony/dom-crawler": "~3.1",
|
"symfony/dom-crawler": "~3.1",
|
||||||
"symfony/css-selector": "~3.1",
|
"symfony/css-selector": "~3.1",
|
||||||
"laravel/browser-kit-testing": "2.*",
|
"laravel/browser-kit-testing": "2.*",
|
||||||
"nategood/httpful": "^0.2.20",
|
"nategood/httpful": "^0.2.20",
|
||||||
"nunomaduro/collision": "^2.0",
|
"nunomaduro/collision": "^3.0",
|
||||||
"beyondcode/laravel-dump-server": "^1.0"
|
"beyondcode/laravel-dump-server": "^1.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|
857
composer.lock
generated
857
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -179,6 +179,8 @@ return [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'aliases' => [
|
'aliases' => [
|
||||||
|
'Str' => Illuminate\Support\Str::class,
|
||||||
|
'Arr' => Illuminate\Support\Arr::class,
|
||||||
|
|
||||||
'App' => Illuminate\Support\Facades\App::class,
|
'App' => Illuminate\Support\Facades\App::class,
|
||||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||||
|
|
|
@ -13,7 +13,8 @@ return [
|
||||||
| using this caching library. This connection is used when another is
|
| using this caching library. This connection is used when another is
|
||||||
| not explicitly specified when executing a given caching function.
|
| not explicitly specified when executing a given caching function.
|
||||||
|
|
|
|
||||||
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
| Supported: "apc", "array", "database", "file",
|
||||||
|
| "memcached", "redis", "dynamodb"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -75,6 +76,15 @@ return [
|
||||||
'connection' => 'cache',
|
'connection' => 'cache',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'dynamodb' => [
|
||||||
|
'driver' => 'dynamodb',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||||
|
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||||
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -35,6 +37,7 @@ return [
|
||||||
|
|
||||||
'sqlite' => [
|
'sqlite' => [
|
||||||
'driver' => 'sqlite',
|
'driver' => 'sqlite',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||||
|
@ -42,6 +45,7 @@ return [
|
||||||
|
|
||||||
'mysql' => [
|
'mysql' => [
|
||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
'host' => env('DB_HOST', '127.0.0.1'),
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
'port' => env('DB_PORT', '3306'),
|
'port' => env('DB_PORT', '3306'),
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
|
@ -54,10 +58,14 @@ return [
|
||||||
'prefix_indexes' => true,
|
'prefix_indexes' => true,
|
||||||
'strict' => true,
|
'strict' => true,
|
||||||
'engine' => null,
|
'engine' => null,
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
],
|
],
|
||||||
|
|
||||||
'pgsql' => [
|
'pgsql' => [
|
||||||
'driver' => 'pgsql',
|
'driver' => 'pgsql',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
'host' => env('DB_HOST', '127.0.0.1'),
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
'port' => env('DB_PORT', '5432'),
|
'port' => env('DB_PORT', '5432'),
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
|
@ -72,6 +80,7 @@ return [
|
||||||
|
|
||||||
'sqlsrv' => [
|
'sqlsrv' => [
|
||||||
'driver' => 'sqlsrv',
|
'driver' => 'sqlsrv',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
'host' => env('DB_HOST', 'localhost'),
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
'port' => env('DB_PORT', '1433'),
|
'port' => env('DB_PORT', '1433'),
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
|
@ -110,9 +119,15 @@ return [
|
||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
|
|
||||||
'client' => 'predis',
|
'client' => env('REDIS_CLIENT', 'predis'),
|
||||||
|
|
||||||
|
'options' => [
|
||||||
|
'cluster' => env('REDIS_CLUSTER', 'predis'),
|
||||||
|
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||||
|
],
|
||||||
|
|
||||||
'default' => [
|
'default' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
'password' => env('REDIS_PASSWORD', null),
|
'password' => env('REDIS_PASSWORD', null),
|
||||||
'port' => env('REDIS_PORT', 6379),
|
'port' => env('REDIS_PORT', 6379),
|
||||||
|
@ -120,6 +135,7 @@ return [
|
||||||
],
|
],
|
||||||
|
|
||||||
'cache' => [
|
'cache' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
'password' => env('REDIS_PASSWORD', null),
|
'password' => env('REDIS_PASSWORD', null),
|
||||||
'port' => env('REDIS_PORT', 6379),
|
'port' => env('REDIS_PORT', 6379),
|
||||||
|
|
|
@ -12,7 +12,7 @@ return [
|
||||||
| your application here. By default, Laravel is setup for SMTP mail.
|
| your application here. By default, Laravel is setup for SMTP mail.
|
||||||
|
|
|
|
||||||
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
|
||||||
| "sparkpost", "log", "array"
|
| "sparkpost", "postmark", "log", "array"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -46,15 +46,16 @@ return [
|
||||||
'host' => 'localhost',
|
'host' => 'localhost',
|
||||||
'queue' => 'default',
|
'queue' => 'default',
|
||||||
'retry_after' => 90,
|
'retry_after' => 90,
|
||||||
|
'block_for' => 0,
|
||||||
],
|
],
|
||||||
|
|
||||||
'sqs' => [
|
'sqs' => [
|
||||||
'driver' => 'sqs',
|
'driver' => 'sqs',
|
||||||
'key' => env('SQS_KEY', 'your-public-key'),
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
'secret' => env('SQS_SECRET', 'your-secret-key'),
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||||
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
||||||
'region' => env('SQS_REGION', 'us-east-1'),
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
|
|
|
@ -8,9 +8,9 @@ return [
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This file is for storing the credentials for third party services such
|
| This file is for storing the credentials for third party services such
|
||||||
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
|
| as Mailgun, SparkPost and others. This file provides a sane default
|
||||||
| default location for this type of information, allowing packages
|
| location for this type of information, allowing packages to have
|
||||||
| to have a conventional place to find your various credentials.
|
| a conventional file to locate the various service credentials.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -20,24 +20,18 @@ return [
|
||||||
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'postmark' => [
|
||||||
|
'token' => env('POSTMARK_TOKEN'),
|
||||||
|
],
|
||||||
|
|
||||||
'ses' => [
|
'ses' => [
|
||||||
'key' => env('SES_KEY'),
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
'secret' => env('SES_SECRET'),
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
'region' => env('SES_REGION', 'us-east-1'),
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'sparkpost' => [
|
'sparkpost' => [
|
||||||
'secret' => env('SPARKPOST_SECRET'),
|
'secret' => env('SPARKPOST_SECRET'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'stripe' => [
|
|
||||||
'model' => App\Models\User::class,
|
|
||||||
'key' => env('STRIPE_KEY'),
|
|
||||||
'secret' => env('STRIPE_SECRET'),
|
|
||||||
'webhook' => [
|
|
||||||
'secret' => env('STRIPE_WEBHOOK_SECRET'),
|
|
||||||
'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -14,7 +14,7 @@ return [
|
||||||
| you may specify any of the other wonderful drivers provided here.
|
| you may specify any of the other wonderful drivers provided here.
|
||||||
|
|
|
|
||||||
| Supported: "file", "cookie", "database", "apc",
|
| Supported: "file", "cookie", "database", "apc",
|
||||||
| "memcached", "redis", "array"
|
| "memcached", "redis", "dynamodb", "array"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -92,9 +92,9 @@ return [
|
||||||
| Session Cache Store
|
| Session Cache Store
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| When using the "apc" or "memcached" session drivers, you may specify a
|
| When using the "apc", "memcached", or "dynamodb" session drivers you may
|
||||||
| cache store that should be used for these sessions. This value must
|
| list a cache store that should be used for these sessions. This value
|
||||||
| correspond with one of the application's configured cache stores.
|
| must match with one of the application's configured cache "stores".
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -13,72 +13,109 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'accepted' => 'The :attribute must be accepted.',
|
'accepted' => 'The :attribute must be accepted.',
|
||||||
'active_url' => 'The :attribute is not a valid URL.',
|
'active_url' => 'The :attribute is not a valid URL.',
|
||||||
'after' => 'The :attribute must be a date after :date.',
|
'after' => 'The :attribute must be a date after :date.',
|
||||||
'alpha' => 'The :attribute may only contain letters.',
|
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
|
'alpha' => 'The :attribute may only contain letters.',
|
||||||
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
|
||||||
'array' => 'The :attribute must be an array.',
|
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||||
'before' => 'The :attribute must be a date before :date.',
|
'array' => 'The :attribute must be an array.',
|
||||||
'between' => [
|
'before' => 'The :attribute must be a date before :date.',
|
||||||
|
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||||
|
'between' => [
|
||||||
'numeric' => 'The :attribute must be between :min and :max.',
|
'numeric' => 'The :attribute must be between :min and :max.',
|
||||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||||
'string' => 'The :attribute must be between :min and :max characters.',
|
'string' => 'The :attribute must be between :min and :max characters.',
|
||||||
'array' => 'The :attribute must have between :min and :max items.',
|
'array' => 'The :attribute must have between :min and :max items.',
|
||||||
],
|
],
|
||||||
'boolean' => 'The :attribute field must be true or false.',
|
'boolean' => 'The :attribute field must be true or false.',
|
||||||
'confirmed' => 'The :attribute confirmation does not match.',
|
'confirmed' => 'The :attribute confirmation does not match.',
|
||||||
'date' => 'The :attribute is not a valid date.',
|
'date' => 'The :attribute is not a valid date.',
|
||||||
'date_format' => 'The :attribute does not match the format :format.',
|
'date_equals' => 'The :attribute must be a date equal to :date.',
|
||||||
'different' => 'The :attribute and :other must be different.',
|
'date_format' => 'The :attribute does not match the format :format.',
|
||||||
'digits' => 'The :attribute must be :digits digits.',
|
'different' => 'The :attribute and :other must be different.',
|
||||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
'digits' => 'The :attribute must be :digits digits.',
|
||||||
'distinct' => 'The :attribute field has a duplicate value.',
|
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||||
'email' => 'The :attribute must be a valid email address.',
|
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||||
'exists' => 'The selected :attribute is invalid.',
|
'distinct' => 'The :attribute field has a duplicate value.',
|
||||||
'filled' => 'The :attribute field is required.',
|
'email' => 'The :attribute must be a valid email address.',
|
||||||
'image' => 'The :attribute must be an image.',
|
'ends_with' => 'The :attribute must end with one of the following: :values',
|
||||||
'in' => 'The selected :attribute is invalid.',
|
'exists' => 'The selected :attribute is invalid.',
|
||||||
'in_array' => 'The :attribute field does not exist in :other.',
|
'file' => 'The :attribute must be a file.',
|
||||||
'integer' => 'The :attribute must be an integer.',
|
'filled' => 'The :attribute field must have a value.',
|
||||||
'ip' => 'The :attribute must be a valid IP address.',
|
'gt' => [
|
||||||
'json' => 'The :attribute must be a valid JSON string.',
|
'numeric' => 'The :attribute must be greater than :value.',
|
||||||
'max' => [
|
'file' => 'The :attribute must be greater than :value kilobytes.',
|
||||||
|
'string' => 'The :attribute must be greater than :value characters.',
|
||||||
|
'array' => 'The :attribute must have more than :value items.',
|
||||||
|
],
|
||||||
|
'gte' => [
|
||||||
|
'numeric' => 'The :attribute must be greater than or equal :value.',
|
||||||
|
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
|
||||||
|
'string' => 'The :attribute must be greater than or equal :value characters.',
|
||||||
|
'array' => 'The :attribute must have :value items or more.',
|
||||||
|
],
|
||||||
|
'image' => 'The :attribute must be an image.',
|
||||||
|
'in' => 'The selected :attribute is invalid.',
|
||||||
|
'in_array' => 'The :attribute field does not exist in :other.',
|
||||||
|
'integer' => 'The :attribute must be an integer.',
|
||||||
|
'ip' => 'The :attribute must be a valid IP address.',
|
||||||
|
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||||
|
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||||
|
'json' => 'The :attribute must be a valid JSON string.',
|
||||||
|
'lt' => [
|
||||||
|
'numeric' => 'The :attribute must be less than :value.',
|
||||||
|
'file' => 'The :attribute must be less than :value kilobytes.',
|
||||||
|
'string' => 'The :attribute must be less than :value characters.',
|
||||||
|
'array' => 'The :attribute must have less than :value items.',
|
||||||
|
],
|
||||||
|
'lte' => [
|
||||||
|
'numeric' => 'The :attribute must be less than or equal :value.',
|
||||||
|
'file' => 'The :attribute must be less than or equal :value kilobytes.',
|
||||||
|
'string' => 'The :attribute must be less than or equal :value characters.',
|
||||||
|
'array' => 'The :attribute must not have more than :value items.',
|
||||||
|
],
|
||||||
|
'max' => [
|
||||||
'numeric' => 'The :attribute may not be greater than :max.',
|
'numeric' => 'The :attribute may not be greater than :max.',
|
||||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||||
'string' => 'The :attribute may not be greater than :max characters.',
|
'string' => 'The :attribute may not be greater than :max characters.',
|
||||||
'array' => 'The :attribute may not have more than :max items.',
|
'array' => 'The :attribute may not have more than :max items.',
|
||||||
],
|
],
|
||||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||||
'min' => [
|
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||||
|
'min' => [
|
||||||
'numeric' => 'The :attribute must be at least :min.',
|
'numeric' => 'The :attribute must be at least :min.',
|
||||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||||
'string' => 'The :attribute must be at least :min characters.',
|
'string' => 'The :attribute must be at least :min characters.',
|
||||||
'array' => 'The :attribute must have at least :min items.',
|
'array' => 'The :attribute must have at least :min items.',
|
||||||
],
|
],
|
||||||
'not_in' => 'The selected :attribute is invalid.',
|
'not_in' => 'The selected :attribute is invalid.',
|
||||||
'numeric' => 'The :attribute must be a number.',
|
'not_regex' => 'The :attribute format is invalid.',
|
||||||
'present' => 'The :attribute field must be present.',
|
'numeric' => 'The :attribute must be a number.',
|
||||||
'regex' => 'The :attribute format is invalid.',
|
'present' => 'The :attribute field must be present.',
|
||||||
'required' => 'The :attribute field is required.',
|
'regex' => 'The :attribute format is invalid.',
|
||||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
'required' => 'The :attribute field is required.',
|
||||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||||
'required_with' => 'The :attribute field is required when :values is present.',
|
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
'required_with' => 'The :attribute field is required when :values is present.',
|
||||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
'required_with_all' => 'The :attribute field is required when :values are present.',
|
||||||
|
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||||
'same' => 'The :attribute and :other must match.',
|
'same' => 'The :attribute and :other must match.',
|
||||||
'size' => [
|
'size' => [
|
||||||
'numeric' => 'The :attribute must be :size.',
|
'numeric' => 'The :attribute must be :size.',
|
||||||
'file' => 'The :attribute must be :size kilobytes.',
|
'file' => 'The :attribute must be :size kilobytes.',
|
||||||
'string' => 'The :attribute must be :size characters.',
|
'string' => 'The :attribute must be :size characters.',
|
||||||
'array' => 'The :attribute must contain :size items.',
|
'array' => 'The :attribute must contain :size items.',
|
||||||
],
|
],
|
||||||
'string' => 'The :attribute must be a string.',
|
'starts_with' => 'The :attribute must start with one of the following: :values',
|
||||||
'timezone' => 'The :attribute must be a valid zone.',
|
'string' => 'The :attribute must be a string.',
|
||||||
'unique' => 'The :attribute has already been taken.',
|
'timezone' => 'The :attribute must be a valid zone.',
|
||||||
'url' => 'The :attribute format is invalid.',
|
'unique' => 'The :attribute has already been taken.',
|
||||||
|
'uploaded' => 'The :attribute failed to upload.',
|
||||||
|
'url' => 'The :attribute format is invalid.',
|
||||||
|
'uuid' => 'The :attribute must be a valid UUID.',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
@extends('shared._app_layout')
|
@extends('shared._app_layout')
|
||||||
|
|
||||||
@section('title'){{ $track->title }} - {{ $track->user->display_name }} | @endsection
|
@section('title'){{ $track->title }} - {{ $track->user->display_name }} | @endsection
|
||||||
@section('description'){{ str_limit($track->description, $limit = 200, $end = '...') }}@endsection
|
@section('description'){{ Str::limit($track->description, $limit = 200, $end = '...') }}@endsection
|
||||||
|
|
||||||
@section('metadata')
|
@section('metadata')
|
||||||
<meta property="og:title" content="{{ $track->title }}" />
|
<meta property="og:title" content="{{ $track->title }}" />
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
<meta property="og:image" content="{{ $track->getCoverUrl(\App\Models\Image::NORMAL) }}" />
|
<meta property="og:image" content="{{ $track->getCoverUrl(\App\Models\Image::NORMAL) }}" />
|
||||||
<meta property="og:image:width" content="350" />
|
<meta property="og:image:width" content="350" />
|
||||||
<meta property="og:image:height" content="350" />
|
<meta property="og:image:height" content="350" />
|
||||||
<meta property="og:description" content="{{ str_limit($track->description, $limit = 200, $end = '...') }}">
|
<meta property="og:description" content="{{ Str::limit($track->description, $limit = 200, $end = '...') }}">
|
||||||
<meta property="og:site_name" content="Pony.fm" />
|
<meta property="og:site_name" content="Pony.fm" />
|
||||||
<meta property="og:audio" content="{{ $track->getStreamUrl('MP3') }}" />
|
<meta property="og:audio" content="{{ $track->getStreamUrl('MP3') }}" />
|
||||||
<meta property="og:audio:secure_url" content="{{ $track->getStreamUrl('MP3') }}" />
|
<meta property="og:audio:secure_url" content="{{ $track->getStreamUrl('MP3') }}" />
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
<meta name="twitter:card" content="player" />
|
<meta name="twitter:card" content="player" />
|
||||||
<meta name="twitter:site" content="@ponyfm" />
|
<meta name="twitter:site" content="@ponyfm" />
|
||||||
<meta name="twitter:title" content="{{ $track->title }}" />
|
<meta name="twitter:title" content="{{ $track->title }}" />
|
||||||
<meta name="twitter:description" content="{{ str_limit($track->description, $limit = 200, $end = '...') }}" />
|
<meta name="twitter:description" content="{{ Str::limit($track->description, $limit = 200, $end = '...') }}" />
|
||||||
<meta name="twitter:image" content="{{ $track->getCoverUrl(\App\Models\Image::NORMAL) }}" />
|
<meta name="twitter:image" content="{{ $track->getCoverUrl(\App\Models\Image::NORMAL) }}" />
|
||||||
<meta name="twitter:player" content="{{ url('t' . $track->id . '/embed?twitter') }}" />
|
<meta name="twitter:player" content="{{ url('t' . $track->id . '/embed?twitter') }}" />
|
||||||
<meta name="twitter:player:width" content="480" />
|
<meta name="twitter:player:width" content="480" />
|
||||||
|
|
|
@ -104,7 +104,7 @@ class TestCase extends BaseTestCase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
protected function tearDown(): void
|
||||||
{
|
{
|
||||||
Storage::disk('local')->deleteDirectory('testing-datastore');
|
Storage::disk('local')->deleteDirectory('testing-datastore');
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
|
Loading…
Reference in a new issue