Skip to content

Commit

Permalink
docs: write docs
Browse files Browse the repository at this point in the history
  • Loading branch information
regnerisch committed May 27, 2024
1 parent 37b6d79 commit c67751a
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 61 deletions.
6 changes: 6 additions & 0 deletions bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ RELEASE_BRANCH="7.x"
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
VERSION=$1

# Make sure all tests are successful
if ! bash bin/test.sh > /dev/null 2>&1; then
echo "Tests did not complete without errors!"
exit 1
fi

# Make sure current branch and release branch match.
if [[ "$RELEASE_BRANCH" != "$CURRENT_BRANCH" ]]
then
Expand Down
10 changes: 0 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,5 @@
"spatie/laravel-queueable-action": "^2.14",
"phpstan/phpstan": "^1.10|^2.0"
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"scripts": {
"pint": "vendor/bin/pint",
"test": "vendor/bin/phpunit",
"phpstan": "vendor/bin/phpstan"
},
"minimum-stability": "dev"
}
11 changes: 8 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Documentation

> [!CAUTION]
> Keep in mind: Laravel Beyond is a dev dependency. Do not use its helper functions like
> `beyond_path`, `beyond_app_path`, `beyond_domain_path` or others.
## Commands
### Application
- [`beyond:make:command`](commands/make-command.md)
Expand All @@ -16,10 +21,10 @@
- [`beyond:make:collection`](commands/make-collection.md)
- [`beyond:make:data`](commands/make-data.md)
- [`beyond:make:enum`](commands/make-enum.md)
- `beyond:make:event`
- `beyond:make:listener`
- [`beyond:make:event`](commands/make-event.md)
- [`beyond:make:listener`](commands/make-listener.md)
- [`beyond:make:model`](commands/make-model.md)
- `beyond:make:observer`
- [`beyond:make:observer`](commands/make-observer.md)
- [`beyond:make:scope`](commands/make-scope.md)

### Support
Expand Down
13 changes: 13 additions & 0 deletions docs/commands/make-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# `beyond:make:event`
Creates a new event.

## Signature
`beyond:make:event {name} {--force}`

| Parameters | Description |
|------------|------------------------|
| name | The name of your event |

| Flags | Description |
|---------|-------------------------|
| --force | Overwrite existing file |
13 changes: 13 additions & 0 deletions docs/commands/make-listener.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# `beyond:make:listener`
Creates a new listener.

## Signature
`beyond:make:listener {name} {--force}`

| Parameters | Description |
|------------|---------------------------|
| name | The name of your listener |

| Flags | Description |
|---------|-------------------------|
| --force | Overwrite existing file |
13 changes: 13 additions & 0 deletions docs/commands/make-observer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# `beyond:make:observer`
Creates a new observer.

## Signature
`beyond:make:observer {name} {--force}`

| Parameters | Description |
|------------|---------------------------|
| name | The name of your observer |

| Flags | Description |
|---------|-------------------------|
| --force | Overwrite existing file |
2 changes: 1 addition & 1 deletion stubs/cast.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace {{ namespace }};
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
use Illuminate\Database\Eloquent\Model;

class {{ className }} implements CastsAttributes
final class {{ className }} implements CastsAttributes
{
/**
* Cast the given value.
Expand Down
20 changes: 0 additions & 20 deletions stubs/factory.stub

This file was deleted.

14 changes: 0 additions & 14 deletions stubs/notification.queueable.stub

This file was deleted.

11 changes: 0 additions & 11 deletions stubs/notification.stub

This file was deleted.

4 changes: 2 additions & 2 deletions stubs/query.stub
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ final class {{ className }} extends QueryBuilder
{
public function __construct(Request $request)
{
// $subject = Model::query()
$subject = Model::query();

parent::__construct($subject, $request);
}
}

0 comments on commit c67751a

Please sign in to comment.