Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sharp Laravel Package

code16/sharp

Sharp is a Laravel 11+ (PHP 8.3+) content management framework for building a CMS/admin area with a clean UI and great DX. Code-driven, data-agnostic, no frontend to write. Manage structured data with search, filters, commands, auth, and validation.

View on GitHub
Deep Wiki
Context7

Passkeys

Sharp provides a built-in solution to manage and authenticate with passkeys. Passkeys are a replacement for passwords that provide faster, easier, and more secure sign-ins to websites and apps across a user’s devices.

Installation

Passkeys in Sharp requires the spatie/laravel-passkeys package. Follow the installation instructions of the package (the JavaScript installation part is not needed for Sharp).

Configuration

To enable passkeys in Sharp, use the enablePasskeys() method in your SharpServiceProvider:

class SharpServiceProvider extends SharpAppServiceProvider
{
    protected function configureSharp(SharpConfigBuilder $config): void
    {
        $config
            ->enablePasskeys()
            // [...]
    }
}

By default, Sharp will prompt the user to create a passkey after a successful password-based login if they don't have one yet. You can disable this feature like this :

$config->enablePasskeys(promptAfterLogin: false);

Management in the User Profile

Once enabled, Sharp automatically registers a PasskeyEntity that you can use in your application. A common use case is to allow users to manage their passkeys from their profile page using a SharpShowEntityListField.

Here is an example of how to add the passkey management list to a ProfileSingleShow:

use Code16\Sharp\Auth\Passkeys\Entity\PasskeyEntity;
use Code16\Sharp\Show\Fields\SharpShowEntityListField;
// ...

class ProfileSingleShow extends SharpSingleShow
{
    protected function buildShowFields(FieldsContainer $showFields): void
    {
        $showFields
            // [...]
            ->addField(
                SharpShowEntityListField::make(PasskeyEntity::class)
                    ->setLabel('Passkeys')
            );
    }

    protected function buildShowLayout(ShowLayout $showLayout): void
    {
        $showLayout
            ->addSection('', function (ShowLayoutSection $section) {
                // [...]
            })
            ->addEntityListSection(PasskeyEntity::class);
    }
    
    // ...
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
croct/coding-standard
croct/plug-php
nqxcode/phpmorphy
boundwize/pyrameter
testo/facade
headercat/phpstan-extension-ide-helper
develia/commons
dmstr/symfony-system-resources-bundle
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
renatomarinho/laravel-page-speed
develia/geo-bundle
austinheap/laravel-database-encryption
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable