Force default timezone to UTC; move helpers.php
This commit is contained in:
parent
f2add8908b
commit
3c41089a8a
@ -224,14 +224,14 @@ trait CacheableRepository
|
||||
public function paginate($limit = null, $columns = ['*'], $method='paginate')
|
||||
{
|
||||
if (!$this->allowedCache('paginate') || $this->isSkippedCache()) {
|
||||
return parent::paginate($limit, $columns);
|
||||
return parent::paginate($limit, $columns, $method);
|
||||
}
|
||||
|
||||
$key = $this->getCacheKey('paginate', func_get_args());
|
||||
|
||||
$minutes = $this->getCacheMinutes();
|
||||
$value = $this->getCacheRepository()->remember($key, $minutes, function () use ($limit, $columns) {
|
||||
return parent::paginate($limit, $columns);
|
||||
$value = $this->getCacheRepository()->remember($key, $minutes, function () use ($limit, $columns, $method) {
|
||||
return parent::paginate($limit, $columns, $method);
|
||||
});
|
||||
|
||||
$this->resetModel();
|
||||
|
@ -64,7 +64,7 @@
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"app/Support/helpers.php"
|
||||
"app/helpers.php"
|
||||
],
|
||||
"classmap": [
|
||||
"database"
|
||||
|
@ -8,7 +8,7 @@ return [
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
'version' => '4.0',
|
||||
|
||||
'timezone' => env('APP_TIMEZONE', 'UTC'),
|
||||
'timezone' => 'UTC',
|
||||
'locale' => env('APP_LOCALE', 'en'),
|
||||
'fallback_locale' => 'en',
|
||||
|
||||
|
@ -13,6 +13,7 @@ return [
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'timezone' => '+00:00',
|
||||
'charset' => 'utf8',
|
||||
'collation' => 'utf8_unicode_ci',
|
||||
'prefix' => '',
|
||||
@ -22,21 +23,25 @@ return [
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => env('DB_DATABASE', storage_path('db.sqlite')),
|
||||
'timezone' => '+00:00',
|
||||
'prefix' => '',
|
||||
],
|
||||
'local' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => storage_path('local.sqlite'),
|
||||
'timezone' => '+00:00',
|
||||
'prefix' => '',
|
||||
],
|
||||
'unittest' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => storage_path('unittest.sqlite'),
|
||||
'timezone' => '+00:00',
|
||||
'prefix' => '',
|
||||
],
|
||||
'memory' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => ':memory:',
|
||||
'timezone' => '+00:00',
|
||||
'prefix' => '',
|
||||
],
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user