mirror of
https://github.com/devfake/flox.git
synced 2024-11-15 06:32:34 +01:00
7059f55d44
* update webpack and vue * Update Laravel Fix tests. Swap native php error log with Laravel's (disable on testing). Remove Laravel Scout. * fluent routing and decrease dbal version * update to php 7.1
35 lines
670 B
PHP
35 lines
670 B
PHP
<?php
|
|
|
|
function increaseTimeLimit()
|
|
{
|
|
set_time_limit(config('app.PHP_TIME_LIMIT'));
|
|
}
|
|
|
|
function getFileName($file)
|
|
{
|
|
return $file->changed->name ?? $file->name;
|
|
}
|
|
|
|
function mediaType($mediaType)
|
|
{
|
|
return $mediaType == 'movies' ? 'movie' : 'tv';
|
|
}
|
|
|
|
function getSlug($title)
|
|
{
|
|
return str_slug($title) != '' ? str_slug($title) : 'no-slug-available';
|
|
}
|
|
|
|
// There is no 'EN' region in TMDb.
|
|
function getRegion($translation)
|
|
{
|
|
return strtolower($translation) == 'en' ? 'us' : $translation;
|
|
}
|
|
|
|
function logInfo($message, $context = [])
|
|
{
|
|
if( ! app()->runningUnitTests()) {
|
|
info($message, $context);
|
|
}
|
|
}
|