Skip to content

Commit

Permalink
Merge branch '1.x' into pr/paginate
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson authored Jan 16, 2024
2 parents 221b659 + 8457c95 commit 7c0c72b
Show file tree
Hide file tree
Showing 98 changed files with 2,582 additions and 1,239 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/admin_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
APP_ENV: testing
DB_CONNECTION: testing
DB_DATABASE: ":memory:"
run: vendor/bin/pest --testsuite admin --parallel
run: vendor/bin/pest --testsuite admin
2 changes: 1 addition & 1 deletion .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
APP_ENV: testing
DB_CONNECTION: testing
DB_DATABASE: ":memory:"
run: vendor/bin/pest --testsuite core --parallel
run: vendor/bin/pest --testsuite core
61 changes: 38 additions & 23 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,38 @@
}
],
"require": {
"php": "^8.1",
"ext-bcmath": "*",
"ext-exif": "*",
"ext-intl": "*",
"awcodes/shout": "^2.0.2",
"barryvdh/laravel-dompdf": "^2.0",
"cartalyst/converter": "^8.0",
"doctrine/dbal": "^3.6",
"ext-bcmath": "*",
"ext-exif": "*",
"ext-intl": "*",
"filament/filament": "^3.1.23",
"filament/spatie-laravel-media-library-plugin": "^3.0-stable",
"guzzlehttp/guzzle": "^7.3",
"illuminate/http": "^10.0",
"kalnoy/nestedset": "^6.0",
"laravel/framework": "^10.0",
"laravel/scout": "^10.0",
"leandrocfe/filament-apex-charts": "^3.0",
"lukascivil/treewalker": "0.9.1",
"marvinosswald/filament-input-select-affix": "^0.1.0",
"php": "^8.1",
"spatie/laravel-activitylog": "^4.4",
"spatie/laravel-blink": "^1.6",
"spatie/laravel-medialibrary": "^10.0.0",
"filament/filament": "^3.1.23",
"filament/spatie-laravel-media-library-plugin": "^3.0-stable",
"spatie/laravel-permission": "^5.10",
"technikermathe/blade-lucide-icons": "^v2.24.0",
"marvinosswald/filament-input-select-affix": "dev-main",
"leandrocfe/filament-apex-charts": "^3.0"
"technikermathe/blade-lucide-icons": "^v2.24.0"
},
"require-dev": {
"laravel/pint": "1.13.1",
"mockery/mockery": "^1.4.4",
"orchestra/testbench": "^8.0",
"symplify/monorepo-builder": "^10.0",
"nunomaduro/larastan": "^2.0",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0"
"pestphp/pest-plugin-laravel": "^2.0",
"symplify/monorepo-builder": "^10.0"
},
"autoload": {
"files": [
Expand All @@ -54,8 +55,14 @@
"Lunar\\Database\\Factories\\": "packages/core/database/factories",
"Lunar\\Database\\Seeders\\": "packages/core/database/seeders",
"Lunar\\Database\\State\\": "packages/core/database/state",
"Lunar\\Opayo\\": "packages/opayo/src",
"Lunar\\Paypal\\": "packages/paypal/src",
"Lunar\\Opayo\\": [
"packages/opayo/src",
"packages/opayo/src/"
],
"Lunar\\Paypal\\": [
"packages/paypal/src",
"packages/paypal/src/"
],
"Lunar\\ScoutDatabaseEngine\\": "packages/scout-database-engine/src",
"Lunar\\Shipping\\": "packages/table-rate-shipping/src",
"Lunar\\Shipping\\Database\\Factories\\": "packages/table-rate-shipping/database/factories"
Expand All @@ -73,14 +80,21 @@
}
},
"extra": {
"lunar": {
"name": [
"Table Rate Shipping",
"Opayo Payments",
"Paypal Payments"
]
},
"laravel": {
"providers": [
"Lunar\\LunarServiceProvider",
"Lunar\\Paypal\\PaypalServiceProvider",
"Lunar\\Admin\\LunarPanelProvider",
"Lunar\\Opayo\\OpayoServiceProvider",
"Lunar\\Paypal\\PaypalServiceProvider",
"Lunar\\ScoutDatabaseEngine\\ScoutDatabaseServiceProvider",
"Lunar\\Shipping\\ShippingServiceProvider"
"Lunar\\Shipping\\ShippingServiceProvider",
"Lunar\\LunarServiceProvider"
]
}
},
Expand All @@ -89,22 +103,23 @@
"lunarphp/core": "self.version",
"lunarphp/opayo": "self.version",
"lunarphp/paypal": "self.version",
"lunarphp/scout-database-engine": "self.version"
"lunarphp/scout-database-engine": "self.version",
"lunarphp/table-rate-shipping": "self.version"
},
"scripts": {
"pint": "pint",
"test:pest": "pest --parallel",
"test:pest": "pest",
"test:phpstan": "phpstan analyse",
"test": [
"@test:pest",
"@test:phpstan"
]
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
}
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
10 changes: 4 additions & 6 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default defineConfig({
items: [
{text: 'Changelog', link: '/core/upgrading'},
{text: 'Contributing', link: '/core/contributing'},
{text: 'Docs Next', link: 'https://docs-next.lunarphp.io/'}
{text: 'Roadmap', link: 'https://github.com/orgs/lunarphp/projects/8'}
]
}
],
Expand All @@ -67,7 +67,6 @@ export default defineConfig({
items: [
{text: 'Overview', link: '/core/overview'},
{text: 'Installation', link: '/core/installation'},
{text: 'Starter Kits', link: '/core/starter-kits'},
{text: 'Configuration', link: '/core/configuration'},
{text: 'Initial Set-Up', link: '/core/set-up'},
{text: 'Upgrade Guide', link: '/core/upgrading'},
Expand Down Expand Up @@ -111,7 +110,7 @@ export default defineConfig({
},
{
text: 'Extending',
collapsed: true,
collapsed: false,
items: [
{text: 'Carts', link: '/core/extending/carts'},
{text: 'Discounts', link: '/core/extending/discounts'},
Expand All @@ -131,15 +130,14 @@ export default defineConfig({
collapsed: false,
items: [
{text: 'Overview', link: '/admin/overview'},
{text: 'Installation', link: '/admin/installation'},
{text: 'Upgrading', link: '/admin/upgrading'}
]
},
{
text: 'Extending',
collapsed: true,
collapsed: false,
items: [
{text: 'Access Control', link: '/admin/extending/access-control'},
{text: 'Add-ons', link: '/admin/extending/addons'},
{text: 'Attributes', link: '/admin/extending/attributes'},
{text: 'Pages', link: '/admin/extending/pages'},
{text: 'Panel', link: '/admin/extending/panel'},
Expand Down
21 changes: 21 additions & 0 deletions docs/admin/extending/addons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Developing Add-ons

When creating add-on packages for Lunar you may wish to add new screens and functionality to the Filament panel.

To achieve this you will want to create a Filament plugin in your package. With Filament plugins you can add additional
resources, pages and widgets. See https://filamentphp.com/docs/3.x/panels/plugins for more information.

## Registering Filament plugins

Add-on packages should not try to register a Filament plugin automatically in the Lunar panel. Instead, installation
instructions should be provided.

Below is an example of how a plugin should be registered to the Lunar admin panel, typically in your Laravel app
service provider.

```php
use Lunar\Admin\Support\Facades\LunarPanel;

LunarPanel::panel(fn($panel) => $panel->plugin(new ReviewsPlugin()))
->register();
```
8 changes: 5 additions & 3 deletions docs/admin/extending/pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ To extend a page you need to create and register an extension.
For example, the code below will register a custom extension called `MyEditExtension` for the `EditProduct` Filament page.

```php
use Lunar\Admin\Support\Facades\LunarPanel;

LunarPanel::registerExtension(new MyEditExtension, EditProduct::class);
```

Expand Down Expand Up @@ -71,7 +73,7 @@ class MyCreateExtension extends CreatePageExtension
}

// Typically placed in your AppServiceProvider file...
LunarPanel::registerExtension(new MyCreateExtension, CreateProduct::class);
LunarPanel::registerExtension(new MyCreateExtension, \Lunar\Admin\Filament\Resources\CustomerGroupResource\Pages\CreateCustomerGroup::class);
```

## EditPageExtension
Expand Down Expand Up @@ -139,7 +141,7 @@ class MyEditExtension extends EditPageExtension
}

// Typically placed in your AppServiceProvider file...
LunarPanel::registerExtension(new MyEditExtension, EditProduct::class);
LunarPanel::registerExtension(new MyEditExtension, \Lunar\Admin\Filament\Resources\ProductResource\Pages\EditProduct::class);
```

## ListPageExtension
Expand Down Expand Up @@ -171,7 +173,7 @@ class MyListExtension extends ListPageExtension
}

// Typically placed in your AppServiceProvider file...
LunarPanel::registerExtension(new MyListExtension, ListProducts::class);
LunarPanel::registerExtension(new MyListExtension, \Lunar\Admin\Filament\Resources\ProductResource\Pages\ListProducts::class);
```

## Extending Pages In Addons
Expand Down
2 changes: 2 additions & 0 deletions docs/admin/extending/panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ We provide a handy function which gives you direct access to the panel to change
For example, the following would change the panel's URL to `/admin` rather than the default `/lunar`.

```php
use Lunar\Admin\Support\Facades\LunarPanel;

LunarPanel::panel(fn($panel) => $panel->path('admin'))
->register();
```
4 changes: 3 additions & 1 deletion docs/admin/extending/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Much like extending pages, to extend a resource you need to create and register
For example, the code below will register a custom extension called `MyProductResourceExtension` for the `ProductResource` Filament resource.

```php
use Lunar\Admin\Support\Facades\LunarPanel;

LunarPanel::registerExtension(new MyProductResourceExtension, \Lunar\Panel\Filament\Resources\ProductResource::class);
```

Expand Down Expand Up @@ -50,4 +52,4 @@ class MyProductResourceExtension extends \Lunar\Panel\Support\Extending\Resource

// Typically placed in your AppServiceProvider file...
LunarPanel::registerExtension(new MyCreateExtension, CreateProduct::class);
```
```
62 changes: 0 additions & 62 deletions docs/admin/installation.md

This file was deleted.

15 changes: 10 additions & 5 deletions docs/admin/overview.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# Introduction

::: danger Work In Progress
This package is very much in-development. It is incomplete and not production ready.
:::

Lunar's admin panel is powered by Filament v3. It allows you to easily extend the admin panel to suit your project.

With the panel you can administer your products, collections, orders, customers, discounts, settings and much more.

## Work In Progress (WIP)

This package is very much in-development. It is incomplete and not production ready.

## Contributing

If you wish to contribute to the project, please review the project at https://github.com/orgs/lunarphp/projects/8/views/8
If you wish to contribute to the project, please review the roadmap at https://github.com/orgs/lunarphp/projects/8/views/8

You can request to contribute on an issue in the backlog, or you can propose a new issue.

::: tip
Here's a guide on how to set-up your development environment ready for contributing to Lunar.
[Setting Up Lunar For Local Development](/core/local-development)
:::
6 changes: 0 additions & 6 deletions docs/admin/upgrading.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/core/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Lunar uses a monorepo [lunarphp/lunar](https://github.com/lunarphp/lunar) approa

## Repository Branching

**Bug Fixes** should target the latest compatible branch version i.e `0.7`. The `main` branch should never have bug fix PR's unless they fix features that are in an upcoming release.
**Bug Fixes** should target the latest compatible branch version i.e `0.7`.

**Features** that bring new (or enhance current) functionality to Lunar should always target the `main` branch.
**Enhancements** should target either `0.8`, or `1.x` if for the new Filament admin panel.

## Contributing Code

Expand Down
Loading

0 comments on commit 7c0c72b

Please sign in to comment.