mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 11:00:39 +00:00
Fix backend code styling
This commit is contained in:
@@ -121,7 +121,8 @@ class Folder extends Model
|
|||||||
public function getCreatedAtAttribute(): string
|
public function getCreatedAtAttribute(): string
|
||||||
{
|
{
|
||||||
return format_date(
|
return format_date(
|
||||||
set_time_by_user_timezone($this->attributes['created_at']), __t('time')
|
set_time_by_user_timezone($this->attributes['created_at']),
|
||||||
|
__t('time')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +136,8 @@ class Folder extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
return format_date(
|
return format_date(
|
||||||
set_time_by_user_timezone($this->attributes['deleted_at']), __t('time')
|
set_time_by_user_timezone($this->attributes['deleted_at']),
|
||||||
|
__t('time')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -927,7 +927,7 @@ if (! function_exists('set_time_by_user_timezone')) {
|
|||||||
/**
|
/**
|
||||||
* Set time by user timezone GMT
|
* Set time by user timezone GMT
|
||||||
*/
|
*/
|
||||||
function set_time_by_user_timezone(string $time): string|Carbon
|
function set_time_by_user_timezone(string $time): string | Carbon
|
||||||
{
|
{
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Tests\Feature\Accounts;
|
namespace Tests\Feature\Accounts;
|
||||||
|
|
||||||
use Domain\Folders\Models\Folder;
|
|
||||||
use Storage;
|
use Storage;
|
||||||
use Notification;
|
use Notification;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
use App\Users\Models\User;
|
use App\Users\Models\User;
|
||||||
|
use Domain\Folders\Models\Folder;
|
||||||
use Illuminate\Http\UploadedFile;
|
use Illuminate\Http\UploadedFile;
|
||||||
use Illuminate\Support\Facades\URL;
|
use Illuminate\Support\Facades\URL;
|
||||||
use Illuminate\Auth\Notifications\VerifyEmail;
|
use Illuminate\Auth\Notifications\VerifyEmail;
|
||||||
@@ -42,17 +42,17 @@ class UserAccountTest extends TestCase
|
|||||||
|
|
||||||
Folder::factory(Folder::class)
|
Folder::factory(Folder::class)
|
||||||
->create([
|
->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'created_at' => now(),
|
'created_at' => now(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user->settings()->update([
|
$user->settings()->update([
|
||||||
'timezone' => '2.0'
|
'timezone' => '2.0',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this
|
$this
|
||||||
->actingAs($user)
|
->actingAs($user)
|
||||||
->getJson("/api/browse/folders/undefined")
|
->getJson('/api/browse/folders/undefined')
|
||||||
->assertJsonFragment([
|
->assertJsonFragment([
|
||||||
'created_at' => '01. January. 2021 at 02:00',
|
'created_at' => '01. January. 2021 at 02:00',
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Tests\Domain\Files;
|
namespace Tests\Domain\Files;
|
||||||
|
|
||||||
use Storage;
|
use Storage;
|
||||||
|
|||||||
Reference in New Issue
Block a user