Skip to content

Feature/all the release notes #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/Support/GitHub.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class GitHub

public const PACKAGE_LARAVEL = 'nativephp/laravel';

public const PACKAGE_PHP_BIN = 'nativephp/php-bin';

public function __construct(
private string $package
) {}
Expand All @@ -27,6 +29,11 @@ public static function laravel(): static
return new static(static::PACKAGE_LARAVEL);
}

public static function phpBin(): static
{
return new static(static::PACKAGE_PHP_BIN);
}

public function latestVersion()
{
$release = Cache::remember(
Expand Down
4 changes: 3 additions & 1 deletion resources/views/components/navigation-bar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class="mx-auto flex w-full max-w-5xl items-center justify-between gap-5 rounded-
class="hidden rounded-full bg-gray-200/60 px-2 py-1 text-xs text-gray-600 lg:block dark:bg-[#16182b] dark:text-[#747ee6] dark:ring-1 dark:ring-cloud"
aria-label="Version information"
>
{{ $electronGitHubVersion }}
<a href="/docs/desktop/1/getting-started/releasenotes">
{{ $electronGitHubVersion }}
</a>
</div>
</div>

Expand Down
27 changes: 26 additions & 1 deletion resources/views/docs/desktop/1/getting-started/releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,33 @@ title: Release Notes
order: 1100
---

## NativePHP/electron
@forelse (\App\Support\GitHub::electron()->releases()->take(10) as $release)
## {{ $release->name }}
### {{ $release->name }}
**Released: {{ \Carbon\Carbon::parse($release->published_at)->format('F j, Y') }}**

{{ $release->getBodyForMarkdown() }}
---
@empty
## We couldn't show you the latest release notes at this time.
Not to worry, you can head over to GitHub to see the [latest release notes](https://github.com/NativePHP/electron/releases).
@endforelse

## NativePHP/laravel
@forelse (\App\Support\GitHub::laravel()->releases()->take(10) as $release)
### {{ $release->name }}
**Released: {{ \Carbon\Carbon::parse($release->published_at)->format('F j, Y') }}**

{{ $release->getBodyForMarkdown() }}
---
@empty
## We couldn't show you the latest release notes at this time.
Not to worry, you can head over to GitHub to see the [latest release notes](https://github.com/NativePHP/electron/releases).
@endforelse

## NativePHP/php-bin
@forelse (\App\Support\GitHub::phpBin()->releases()->take(10) as $release)
### {{ $release->name }}
**Released: {{ \Carbon\Carbon::parse($release->published_at)->format('F j, Y') }}**

{{ $release->getBodyForMarkdown() }}
Expand Down