mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 02:46:52 +01:00 
			
		
		
		
	* Fix these * Update phpstan * Transform these into their identifiers instead * Fix custom rule * License is wrong * Update these * Pint fixes * Fix this * Consolidate these * Never supported PHP 7 * Better evaluation * Fixes * Don’t need ignore * Replace trait with service * Subusers are simply the many to many relationship between Servers and Users * Adjust to remove ignores * Use new query builder instead! * wip * Update composer * Quick fixes * Use realtime facade * Small fixes * Convert to static to avoid new * Update to statics * Don’t modify protected properties directly * Run pint * Change to correct method * Give up and use the facade * Make sure this route is available * Filament hasn’t been loaded yet * This can be readonly * Typehint * These are no longer used * Quick fixes * Need doc block help * Always true * We use caddy with docker * Pint * Fix phpstan issues * Remove unused import --------- Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com>
		
			
				
	
	
		
			29 lines
		
	
	
		
			623 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			623 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Filament\Components\Tables\Columns;
 | 
						|
 | 
						|
use Filament\Tables\Columns\TextColumn;
 | 
						|
 | 
						|
class DateTimeColumn extends TextColumn
 | 
						|
{
 | 
						|
    protected function setUp(): void
 | 
						|
    {
 | 
						|
        parent::setUp();
 | 
						|
 | 
						|
        $this->dateTime();
 | 
						|
    }
 | 
						|
 | 
						|
    public function since(?string $timezone = null): static
 | 
						|
    {
 | 
						|
        $this->formatStateUsing(fn ($state) => $state->diffForHumans());
 | 
						|
        $this->tooltip(fn ($state) => $state?->timezone($this->getTimezone()));
 | 
						|
 | 
						|
        return $this;
 | 
						|
    }
 | 
						|
 | 
						|
    public function getTimezone(): string
 | 
						|
    {
 | 
						|
        return auth()->user()->timezone ?? config('app.timezone', 'UTC');
 | 
						|
    }
 | 
						|
}
 |