Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenjude committed Feb 29, 2024
1 parent 39d7748 commit 99e6e8d
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 33 deletions.
55 changes: 34 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# Laravel Jetstream adapter for Filament Admin Panels
# Filament Jetstream

[![Latest Version on Packagist](https://img.shields.io/packagist/v/stephenjude/filament-jetstream.svg?style=flat-square)](https://packagist.org/packages/stephenjude/filament-jetstream)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/stephenjude/filament-jetstream/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/stephenjude/filament-jetstream/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/stephenjude/filament-jetstream/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/stephenjude/filament-jetstream/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/stephenjude/filament-jetstream.svg?style=flat-square)](https://packagist.org/packages/stephenjude/filament-jetstream)

This package adapts Laravel Jetstream Livewire into your filament admin panel, and it supports team, api and dark mode.
This package natively installs all the [Laravel Jetstream](https://jetstream.laravel.com/) features into your Filament
application. Just like Laravel Jetstream, this package should only be installed on afresh Laravel application. You don't
need to install Livewire, Jetstream or Filament before using this package. It does all the work for you!

## How It Wokrs

This package did not reinvent the wheel. Under the hood, it uses all the Livewire components from Laravel Jetstream
and removes anything that is not needed. You can enable or disable features from the Jetstream config, and it works on
Filament too.

## Installation

Expand All @@ -15,34 +23,38 @@ You can install the package via composer:
composer require stephenjude/filament-jetstream
```

Install Jetstream with team, api and email verification.
```php
php artisan filament:jetstream:install --teams --api --verification
## Install Jetstream With Teams And API Features

```shell
php artisan filament:jetstream:install --teams --api
```

You can publish the config file with:
You can remove the `--teams` and `--api` arguments if you don't want those features.

```bash
php artisan vendor:publish --tag="filament-jetstream-config"
```
## Screenshots

Optionally, you can publish the views using
![Edit Profile](art/profile_1.png)

```bash
php artisan vendor:publish --tag="filament-jetstream-views"
```
---

This is the contents of the published config file:
![Edit Profile](art/profile_2.png)

```php
return [
];
```
---

![Edit Team](art/team_1.png)

---

![Edit Team](art/team_2.png)

---

## Usage
![Edit Team](art/api_token.png)

```php
php artisan
You can publish the config file with:

```bash
php artisan vendor:publish --tag="filament-jetstream-config"
```

## Testing
Expand All @@ -66,6 +78,7 @@ Please review [our security policy](../../security/policy) on how to report secu
## Credits

- [stephenjude](https://github.com/stephenjude)
- [taylorotwell](https://github.com/taylorotwell)
- [All Contributors](../../contributors)

## License
Expand Down
Binary file added art/api_token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/profile_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/profile_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/team_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/team_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 2 additions & 9 deletions config/filament-jetstream.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
<?php

// config for FilamentJetstream/FilamentJetstream
return [

/*
* Disable Jetstream and Fortify routes. If you want your users to still used
/**
* Display, hide and sort user's navigation items from this package
*/
'enable_route' => [
'fortify' => true,
'jetstream' => false,
],

'navigation_items' => [
'profile' => [
'display' => false,
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/ApiTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public static function shouldRegisterNavigation(): bool

public static function getNavigationSort(): ?int
{
return (bool) config('filament-jetstream.navigation_items.api_token.sort');
return config('filament-jetstream.navigation_items.api_token.sort');
}
}
2 changes: 1 addition & 1 deletion src/Pages/EditProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public static function shouldRegisterNavigation(): bool

public static function getNavigationSort(): ?int
{
return (bool)config('filament-jetstream.navigation_items.profile.sort');
return config('filament-jetstream.navigation_items.profile.sort');
}
}
2 changes: 1 addition & 1 deletion src/Pages/EditTeam.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public static function shouldRegisterNavigation(): bool

public static function getNavigationSort(): ?int
{
return (bool) config('filament-jetstream.navigation_items.team.sort');
return config('filament-jetstream.navigation_items.team.sort');
}
}

0 comments on commit 99e6e8d

Please sign in to comment.