Skip to content
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
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions resources/views/components/customer/plugin-credentials.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
</div>
<button
type="button"
x-data x-on:click="navigator.clipboard.writeText('composer config repositories.nativephp-plugins composer https://plugins.nativephp.com')"
x-data="{ copied: false }"
x-on:click="navigator.clipboard.writeText('composer config repositories.nativephp-plugins composer https://plugins.nativephp.com').then(() => { copied = true; setTimeout(() => copied = false, 2000) })"
class="shrink-0 self-stretch bg-zinc-900 px-3 text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"
title="Copy command"
>
<flux:icon name="clipboard" variant="outline" class="size-4" />
<flux:icon x-show="!copied" name="clipboard" variant="outline" class="size-4" />
<flux:icon x-show="copied" x-cloak name="check-circle" variant="outline" class="size-4 text-green-400" />
</button>
</div>
<flux:text class="text-xs">2. Configure your credentials:</flux:text>
Expand All @@ -39,11 +41,13 @@ class="shrink-0 self-stretch bg-zinc-900 px-3 text-zinc-400 hover:bg-zinc-800 ho
</div>
<button
type="button"
x-data x-on:click="navigator.clipboard.writeText('composer config http-basic.plugins.nativephp.com {{ auth()->user()->email }} {{ $pluginLicenseKey }}')"
x-data="{ copied: false }"
x-on:click="navigator.clipboard.writeText('composer config http-basic.plugins.nativephp.com {{ auth()->user()->email }} {{ $pluginLicenseKey }}').then(() => { copied = true; setTimeout(() => copied = false, 2000) })"
class="shrink-0 self-stretch bg-zinc-900 px-3 text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"
title="Copy command"
>
<flux:icon name="clipboard" variant="outline" class="size-4" />
<flux:icon x-show="!copied" name="clipboard" variant="outline" class="size-4" />
<flux:icon x-show="copied" x-cloak name="check-circle" variant="outline" class="size-4 text-green-400" />
</button>
</div>
</div>
Expand Down
7 changes: 7 additions & 0 deletions resources/views/docs/mobile/1/concepts/push-notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ user's device.

<aside>

Push notifications do not work in the iOS Simulator. This is an Apple limitation. You must use a physical iOS device
to test push notifications.

</aside>

<aside>

The server-side implementation is out of scope for this documentation.

</aside>
7 changes: 7 additions & 0 deletions resources/views/docs/mobile/2/concepts/push-notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ user's device.

<aside>

Push notifications do not work in the iOS Simulator. This is an Apple limitation. You must use a physical iOS device
to test push notifications.

</aside>

<aside>

The server-side implementation is out of scope for this documentation.

</aside>
7 changes: 7 additions & 0 deletions resources/views/docs/mobile/3/concepts/push-notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ user's device.

<aside>

Push notifications do not work in the iOS Simulator. This is an Apple limitation. You must use a physical iOS device
to test push notifications.

</aside>

<aside>

The server-side implementation is out of scope for this documentation.

</aside>
27 changes: 27 additions & 0 deletions resources/views/docs/mobile/3/plugins/using-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,33 @@ composer require vendor/nativephp-plugin-name
The plugin's PHP service provider will be auto-discovered by Laravel, but the native code won't be included in builds
until you explicitly register it.

### Installing Premium Plugins

Premium plugins from the [NativePHP Plugin Marketplace](/plugins) are served via a private Composer repository.
You'll need to configure Composer before you can install them.

**1. Add the NativePHP plugins repository:**

```shell
composer config repositories.nativephp-plugins composer https://plugins.nativephp.com
```

**2. Configure your credentials:**

```shell
composer config http-basic.plugins.nativephp.com your-email@example.com your-license-key
```

You can find your credentials on your [Purchased Plugins](/dashboard/purchased-plugins) dashboard.

**3. Install the plugin:**

Once configured, install premium plugins just like any other:

```shell
composer require vendor/nativephp-premium-plugin
```

## Register the Plugin

For security, plugins must be explicitly registered before their native code is compiled into your app. This prevents
Expand Down
67 changes: 67 additions & 0 deletions resources/views/plugin-show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,73 @@ class="font-mono text-2xl font-bold sm:text-3xl"
</div>
@endif

@if ($plugin->isPaid())
<aside class="mb-6 rounded-2xl border border-indigo-200 bg-indigo-50 p-5 dark:border-indigo-800 dark:bg-indigo-950/30">
<h3 class="text-sm font-semibold text-indigo-900 dark:text-indigo-200">Installing this plugin</h3>
<p class="mt-1 text-sm text-indigo-800 dark:text-indigo-300">
Premium plugins require Composer to be configured with the NativePHP plugin repository and your credentials.
</p>
<div class="mt-3 space-y-2">
<div class="flex items-center gap-2 rounded-lg bg-zinc-900 dark:bg-zinc-800">
<div class="min-w-0 flex-1 overflow-x-auto p-3">
<code class="block whitespace-pre font-mono text-xs text-zinc-100">composer config repositories.nativephp-plugins composer https://plugins.nativephp.com</code>
</div>
<button
type="button"
x-data="{ copied: false }"
x-on:click="navigator.clipboard.writeText('composer config repositories.nativephp-plugins composer https://plugins.nativephp.com').then(() => { copied = true; setTimeout(() => copied = false, 2000) })"
class="shrink-0 self-stretch px-3 text-zinc-400 hover:text-zinc-200"
title="Copy command"
>
<x-heroicon-o-clipboard x-show="!copied" class="size-4" />
<x-heroicon-o-check-circle x-show="copied" x-cloak class="size-4 text-green-400" />
</button>
</div>
@auth
<div class="flex items-center gap-2 rounded-lg bg-zinc-900 dark:bg-zinc-800">
<div class="min-w-0 flex-1 overflow-x-auto p-3">
<code class="block whitespace-pre font-mono text-xs text-zinc-100">composer config http-basic.plugins.nativephp.com {{ auth()->user()->email }} {{ auth()->user()->getPluginLicenseKey() }}</code>
</div>
<button
type="button"
x-data="{ copied: false }"
x-on:click="navigator.clipboard.writeText('composer config http-basic.plugins.nativephp.com {{ auth()->user()->email }} {{ auth()->user()->getPluginLicenseKey() }}').then(() => { copied = true; setTimeout(() => copied = false, 2000) })"
class="shrink-0 self-stretch px-3 text-zinc-400 hover:text-zinc-200"
title="Copy command"
>
<x-heroicon-o-clipboard x-show="!copied" class="size-4" />
<x-heroicon-o-check-circle x-show="copied" x-cloak class="size-4 text-green-400" />
</button>
</div>
@else
<div class="flex items-center gap-2 rounded-lg bg-zinc-900 dark:bg-zinc-800">
<div class="min-w-0 flex-1 overflow-x-auto p-3">
<code class="block whitespace-pre font-mono text-xs text-zinc-100">composer config http-basic.plugins.nativephp.com <span class="text-zinc-400">your-email@example.com</span> <span class="text-zinc-400">your-license-key</span></code>
</div>
<button
type="button"
x-data="{ copied: false }"
x-on:click="navigator.clipboard.writeText('composer config http-basic.plugins.nativephp.com your-email@example.com your-license-key').then(() => { copied = true; setTimeout(() => copied = false, 2000) })"
class="shrink-0 self-stretch px-3 text-zinc-400 hover:text-zinc-200"
title="Copy command"
>
<x-heroicon-o-clipboard x-show="!copied" class="size-4" />
<x-heroicon-o-check-circle x-show="copied" x-cloak class="size-4 text-green-400" />
</button>
</div>
@endauth
</div>
<p class="mt-3 text-xs text-indigo-700 dark:text-indigo-400">
@auth
Manage your credentials on your <a href="{{ route('customer.purchased-plugins.index') }}" class="font-medium underline hover:no-underline">Purchased Plugins</a> dashboard.
@else
<a href="{{ route('login') }}" class="font-medium underline hover:no-underline">Log in</a> to see your credentials, or find them on your <a href="{{ route('customer.purchased-plugins.index') }}" class="font-medium underline hover:no-underline">Purchased Plugins</a> dashboard.
@endauth
<a href="{{ url('docs/mobile/3/plugins/using-plugins') }}" class="font-medium underline hover:no-underline">Learn more &rarr;</a>
</p>
</aside>
@endif

<article
x-init="
() => {
Expand Down
Loading