-
app/Models/LaravelVersion.php
Open in GitHubuse Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class LaravelVersion extends Model { use HasFactory; protected $casts = [ 'released_at' => 'date', 'ends_bugfixes_at' => 'date', 'ends_securityfixes_at' => 'date', 'is_lts' => 'bool', ]; // }
-
resources/views/partials/tables/current_table.blade.php
Open in GitHub// @foreach ($activeVersions as $version) <tr> <th class="px-6 py-4 text-sm font-medium text-left text-gray-900 whitespace-nowrap"> <a href="{{ $version->url }}" class="border-hover">{{ $version->major }} {{ $version->released_at->gt(now()) ? '(' . __('not released yet!') . ')' : '' }}</a> </th> <td class="px-6 py-4 text-sm text-gray-500 whitespace-nowrap"> {{ $version->released_at->gt(now()) ? $version->released_at->translatedFormat(__('DateShortFormat')) . ' (' . __('estimated') . ')' : $version->released_at->translatedFormat(__('DateLongFormat')) }} </td> <td class="py-4 pl-6 text-sm text-gray-500 lg:pl-8 whitespace-nowrap"> @if ($version->ends_bugfixes_at) {{ $version->released_at->gt(now()) ? $version->ends_bugfixes_at->translatedFormat(__('DateShortFormat')) . ' (' . __('estimated') . ')' : $version->ends_bugfixes_at->translatedFormat(__('DateLongFormat')) }} @endif </td> <td class="py-4 pl-6 text-sm text-gray-500 lg:pl-8 whitespace-nowrap"> @if ($version->ends_securityfixes_at) {{ $version->released_at->gt(now()) ? $version->ends_securityfixes_at->translatedFormat(__('DateShortFormat')) . ' (' . __('estimated') . ')' : $version->ends_securityfixes_at->translatedFormat(__('DateLongFormat')) }} @endif </td> <td class="py-4 pl-6 text-sm text-gray-500 lg:pl-8 whitespace-nowrap"> {{ $version->is_lts ? '✓' : '' }} </td> <td scope="col"> <div class="{{ $statusClassMap[$version->status] }}"> <span>{{ $statusTextMap[$version->status] }}</span> </div> </td> </tr> @endforeach //