Skip to content

Commit d2705e4

Browse files
authored
Skeleton docs and installer (#751)
* Skeleton docs and installer * Update ROADMAP.md * Fix deleted command
1 parent a0a036b commit d2705e4

File tree

5 files changed

+255
-177
lines changed

5 files changed

+255
-177
lines changed

packages/skeleton/CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# Changelog
22

33
We currently don't track changes in this package. Please refer to the [Moox Monorepo](https://github.com/mooxphp/moox) for the latest changes.
4-
5-
We'll add a changelog in the future.

packages/skeleton/README.md

Lines changed: 12 additions & 175 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22

33
# Moox Skeleton
44

5-
<!--shortdesc-->
6-
75
This template is used for generating Moox packages. Press the Template-Button in GitHub, create your own Laravel and Filament package.
86

9-
<!--/shortdesc-->
10-
11-
## Quick Installation
7+
## Installation
128

139
These two commmands are all you need to install the package:
1410

@@ -17,7 +13,7 @@ composer require moox/skeleton
1713
php artisan skeleton:install
1814
```
1915

20-
Curious what the install command does? See manual installation below.
16+
More information about the requirements and installation can be found in the [installation guide](docs/INSTALLATION.md).
2117

2218
## Using the Template
2319

@@ -27,189 +23,30 @@ Curious what the install command does? See manual installation below.
2723
4. Clone the repository locally
2824
5. Run `php build.php`in the repo's directory and follow the steps
2925

30-
After building the package, you can push the changes to GitHub and create an installable package on Packagist.org. Don't forget to adjust the README to your composer namespace.
31-
3226
### Config
3327

34-
After that the Resource is highly configurable.
35-
36-
#### Tabs and Translation
37-
38-
Moox Core features like Dynamic Tabs and Translatable Config. See the config file for more details, but as a quick example:
39-
40-
```php
41-
/*
42-
|--------------------------------------------------------------------------
43-
| Tabs
44-
|--------------------------------------------------------------------------
45-
|
46-
| Define the tabs for the Resource table. They are optional, but
47-
| pretty awesome to filter the table by certain values.
48-
| You may simply do a 'tabs' => [], to disable them.
49-
|
50-
*/
51-
52-
'tabs' => [
53-
'all' => [
54-
'label' => 'trans//core::core.all',
55-
'icon' => 'gmdi-filter-list',
56-
'query' => [
57-
[
58-
'field' => 'deleted_at',
59-
'operator' => '=',
60-
'value' => null,
61-
],
62-
],
63-
],
64-
'published' => [
65-
'label' => 'trans//core::core.published',
66-
'icon' => 'gmdi-check-circle',
67-
'query' => [
68-
[
69-
'field' => 'publish_at',
70-
'operator' => '<=',
71-
'value' => function () {
72-
return now();
73-
},
74-
],
75-
[
76-
'field' => 'deleted_at',
77-
'operator' => '=',
78-
'value' => null,
79-
],
80-
],
81-
],
82-
'scheduled' => [
83-
'label' => 'trans//core::core.scheduled',
84-
'icon' => 'gmdi-schedule',
85-
'query' => [
86-
[
87-
'field' => 'publish_at',
88-
'operator' => '>',
89-
'value' => function () {
90-
return now();
91-
},
92-
],
93-
[
94-
'field' => 'deleted_at',
95-
'operator' => '=',
96-
'value' => null,
97-
],
98-
],
99-
],
100-
'draft' => [
101-
'label' => 'trans//core::core.draft',
102-
'icon' => 'gmdi-text-snippet',
103-
'query' => [
104-
[
105-
'field' => 'publish_at',
106-
'operator' => '=',
107-
'value' => null,
108-
],
109-
[
110-
'field' => 'deleted_at',
111-
'operator' => '=',
112-
'value' => null,
113-
],
114-
],
115-
],
116-
'deleted' => [
117-
'label' => 'trans//core::core.deleted',
118-
'icon' => 'gmdi-delete',
119-
'query' => [
120-
[
121-
'field' => 'deleted_at',
122-
'operator' => '!=',
123-
'value' => null,
124-
],
125-
],
126-
],
127-
],
128-
],
129-
```
130-
131-
All options for Tabs are explained in [Moox Core docs](https://github.com/mooxphp/core/blob/main/README.md#dynamic-tabs).
132-
133-
#### Item Types
134-
135-
The item also support 'item' types, means you are able to configure selectable types for your Entity. By default, we provide "Post" and "Page" as example. If you don't want to use types, just empty the array and the field and column become invisible.
136-
137-
```php
138-
/*
139-
|--------------------------------------------------------------------------
140-
| Item Types
141-
|--------------------------------------------------------------------------
142-
|
143-
| This array contains the types of items entities. You can delete
144-
| the types you don't need and add new ones. If you don't need
145-
| types, you can empty this array like this: 'types' => [],
146-
|
147-
*/
148-
149-
'types' => [
150-
'post' => 'Post',
151-
'page' => 'Page',
152-
],
153-
```
154-
155-
#### Author Model
156-
157-
You can configure the user model used for displaying Authors. By default it is tied to App User:
158-
159-
```php
160-
/*
161-
|--------------------------------------------------------------------------
162-
| Author Model
163-
|--------------------------------------------------------------------------
164-
|
165-
| This sets the user model that can be used as author. It should be an
166-
| authenticatable model and support the morph relationship.
167-
| It should have fields similar to Moox User or WpUser.
168-
|
169-
*/
170-
171-
'author_model' => \App\Models\User::class,
172-
```
173-
174-
You may probably use Moox User
175-
176-
```php
177-
'author_model' => \Moox\User\Models\User::class,
178-
```
179-
180-
or Moox Press User instead:
181-
182-
```php
183-
'author_model' => \Moox\Press\Models\WpUser::class,
184-
```
28+
After that the Resource is highly configurable, see the [config file](config/skeleton.php).
18529

186-
<!--/whatdoes-->
30+
## Development
18731

188-
## Manual Installation
189-
190-
Instead of using the install-command `php artisan skeleton:install` you are able to install this package manually step by step:
191-
192-
```bash
193-
// Publish and run the migrations:
194-
php artisan vendor:publish --tag="skeleton-migrations"
195-
php artisan migrate
196-
197-
// Publish the config file with:
198-
php artisan vendor:publish --tag="skeleton-config"
199-
```
32+
Development, translation and documentation for this package is done in the [Moox Monorepo](https://github.com/mooxphp/moox).
20033

20134
## Changelog
20235

20336
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
20437

38+
## Roadmap
39+
40+
Please see [ROADMAP](ROADMAP.md) for information on what is in development or planned.
41+
20542
## Security Vulnerabilities
20643

207-
Please review [our security policy](https://github.com/mooxphp/moox/security/policy) on how to report security vulnerabilities.
44+
Please review [our security policy](SECURITY.md) on how to report security vulnerabilities.
20845

20946
## Credits
21047

211-
- [All Contributors](../../contributors)
48+
- [Contributors](https://github.com/mooxphp/moox/blob/main/README.md#Contributors)
21249

21350
## License
21451

215-
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
52+
The MIT License (MIT). See [License](LICENSE.md) for more information.

packages/skeleton/ROADMAP.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Roadmap
2+
3+
## Current tasks
4+
5+
- [ ] Create the package using the template
6+
- [ ] Implement great things
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Installation
2+
3+
## Requirements
4+
5+
- PHP >= 8.3
6+
- Laravel 11.x
7+
- Filament 3.2
8+
9+
## Installation
10+
11+
These two commmands are all you need to install the package:
12+
13+
```bash
14+
composer require moox/skeleton
15+
php artisan skeleton:install
16+
```
17+
18+
## Manual Installation
19+
20+
Instead of using the install-command `php artisan skeleton:install` you are able to install this package manually step by step:
21+
22+
```bash
23+
// Publish and run the migrations:
24+
php artisan vendor:publish --tag="skeleton-migrations"
25+
php artisan migrate
26+
27+
// Publish the config file with:
28+
php artisan vendor:publish --tag="skeleton-config"
29+
```

0 commit comments

Comments
 (0)