-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Gaal
committed
Jan 22, 2024
1 parent
fb37108
commit dc5496a
Showing
17 changed files
with
327 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,30 @@ | ||
* Getting Started | ||
* [Installation](installation.md) | ||
* Structure | ||
* [Upgrade Guide](upgrade.md) | ||
* Roadmap | ||
* Commands | ||
* [MakeActionCommand](make-action-command.md) | ||
* [Action](commands/action.md) | ||
* [Builder](commands/builder.md) | ||
* [Collection](commands/collection.md) | ||
* [Command](commands/command.md) | ||
* [Controller](commands/controller.md) | ||
* Data | ||
* Enum | ||
* Event | ||
* Job | ||
* Listener | ||
* Middleware | ||
* Migration | ||
* Model | ||
* Module | ||
* Notification | ||
* Observer | ||
* Policy | ||
* Process | ||
* Query | ||
* Request | ||
* Resource | ||
* Rule | ||
* ServiceProvider | ||
* Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Builder | ||
Creates a new eloquent builder inside the given module. | ||
|
||
> Builders will be placed in `modules/{Module}/Domain/Builders` | ||
## Usage | ||
```bash | ||
php artisan beyond:make:builder User.Admin/UserAdminBuilder | ||
php artisan beyond:make:builder User.UserBuilder | ||
``` | ||
|
||
### Command | ||
`beyond:make:builder {name} {--force}` | ||
|
||
### Flags | ||
| Name | Short | Description | Example | | ||
|---------|-------|--------------------------|---------| | ||
| --force | | Overwrites existing file | | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Collection | ||
Creates a new collection inside the given module. | ||
|
||
> Collections will be placed in `modules/{Module}/Domain/Collections` | ||
## Usage | ||
```bash | ||
php artisan beyond:make:collection User.Admin/UserAdminCollection | ||
php artisan beyond:make:collection User.UserCollection | ||
``` | ||
|
||
### Command | ||
`beyond:make:collection {name} {--model=} {--force}` | ||
|
||
### Flags | ||
| Name | Short | Description | Example | | ||
|---------|-------|----------------------------------|---------| | ||
| --model | | Adds the model to the collection | User | | ||
| --force | | Overwrites existing file | | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Command | ||
Creates a new command inside the given module. | ||
|
||
> Commands will be placed in `modules/{Module}/App/Commands` | ||
## Usage | ||
```bash | ||
php artisan beyond:make:command User.Admin/SyncAdminCommand | ||
php artisan beyond:make:command User.PurgeInactiveUsersCommand | ||
``` | ||
|
||
### Command | ||
`beyond:make:command {name} {--command=command:name} {--force}` | ||
|
||
### Flags | ||
| Name | Short | Description | Example | | ||
|-----------|-------|--------------------------|--------------| | ||
| --command | | Defines the CLI command | command:name | | ||
| --force | | Overwrites existing file | | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Controller | ||
Creates a new controller inside the given module. | ||
|
||
> Controllers will be placed in `modules/{Module}/App/Controllers` | ||
## Usage | ||
```bash | ||
php artisan beyond:make:controller User.Admin/UserAdminController | ||
php artisan beyond:make:controller User.UserController | ||
``` | ||
|
||
### Command | ||
`beyond:make:controller {name} {--api} {--i|invokable} {--force}` | ||
|
||
### Flags | ||
| Name | Short | Description | Example | | ||
|-------------------|-------|----------------------------------|---------| | ||
| --api | | Creates a API controller | | | ||
| --i / --invokable | | Creates an invokable controller | | | ||
| --force | | | | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
# Installation | ||
It's recommended to install `laravel-beyond` with [composer](https://getcomposer.org). | ||
It's recommended to install Laravel Beyond with [composer](https://getcomposer.org). | ||
|
||
```bash | ||
composer require --dev akrillia/laravel-beyond | ||
``` | ||
|
||
## Requirements | ||
|
||
### v7.x | ||
| Package | Version | | ||
|---------|---------| | ||
| php | ^8.2 | | ||
| Laravel | ^10.x | | ||
|
||
### v6.x | ||
| Package | Version | | ||
|---------|-------------| | ||
| php | ^8.1 | | ||
| Laravel | ^9.x\|^10.x | | ||
| Version | PHP | Laravel | | ||
|---------|------|--------------| | ||
| 7.x | ^8.2 | ^10.x | | ||
| 6.x | ^8.1 | ^9.x / ^10.x | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\DocumentationTest; | ||
|
||
use Tests\TestCase; | ||
|
||
class ActionTest extends TestCase | ||
{ | ||
protected string $path = '/docs/commands/action.md'; | ||
|
||
public function testCorrectDocumentation(): void | ||
{ | ||
$file = beyond_path() . $this->path; | ||
$contents = file_get_contents($file); | ||
|
||
$this->assertFileExists($file); | ||
$this->assertStringContainsString('# Action', $contents); | ||
$this->assertStringContainsString('modules/{Module}/Domain/Actions', $contents); | ||
$this->assertStringContainsString('beyond:make:action {name} {--force}', $contents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\DocumentationTest; | ||
|
||
use Tests\TestCase; | ||
|
||
class BuilderTest extends TestCase | ||
{ | ||
protected string $path = '/docs/commands/builder.md'; | ||
|
||
public function testCorrectDocumentation(): void | ||
{ | ||
$file = beyond_path() . $this->path; | ||
$contents = file_get_contents($file); | ||
|
||
$this->assertFileExists($file); | ||
$this->assertStringContainsString('# Builder', $contents); | ||
$this->assertStringContainsString('modules/{Module}/Domain/Builders', $contents); | ||
$this->assertStringContainsString('beyond:make:builder {name} {--force}', $contents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\DocumentationTest; | ||
|
||
use Tests\TestCase; | ||
|
||
class CollectionTest extends TestCase | ||
{ | ||
protected string $path = '/docs/commands/collection.md'; | ||
|
||
public function testCorrectDocumentation(): void | ||
{ | ||
$file = beyond_path() . $this->path; | ||
$contents = file_get_contents($file); | ||
|
||
$this->assertFileExists($file); | ||
$this->assertStringContainsString('# Collection', $contents); | ||
$this->assertStringContainsString('modules/{Module}/Domain/Collections', $contents); | ||
$this->assertStringContainsString('beyond:make:collection {name} {--model=} {--force}', $contents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\DocumentationTest; | ||
|
||
use Tests\TestCase; | ||
|
||
class CommandTest extends TestCase | ||
{ | ||
protected string $path = '/docs/commands/command.md'; | ||
|
||
public function testCorrectDocumentation(): void | ||
{ | ||
$file = beyond_path() . $this->path; | ||
$contents = file_get_contents($file); | ||
|
||
$this->assertFileExists($file); | ||
$this->assertStringContainsString('# Command', $contents); | ||
$this->assertStringContainsString('modules/{Module}/App/Commands', $contents); | ||
$this->assertStringContainsString('beyond:make:command {name} {--command=command:name} {--force}', $contents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\DocumentationTest; | ||
|
||
use Tests\TestCase; | ||
|
||
class ControllerTest extends TestCase | ||
{ | ||
protected string $path = '/docs/commands/controller.md'; | ||
|
||
public function testCorrectDocumentation(): void | ||
{ | ||
$file = beyond_path() . $this->path; | ||
$contents = file_get_contents($file); | ||
|
||
$this->assertFileExists($file); | ||
$this->assertStringContainsString('# Controller', $contents); | ||
$this->assertStringContainsString('modules/{Module}/App/Controllers', $contents); | ||
$this->assertStringContainsString('beyond:make:controller {name} {--api} {--i|invokable} {--force}', $contents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\DocumentationTest; | ||
|
||
use Tests\TestCase; | ||
|
||
class DataObjectTest extends TestCase | ||
{ | ||
protected string $path = '/docs/commands/data-object.md'; | ||
|
||
public function testCorrectDocumentation(): void | ||
{ | ||
$file = beyond_path() . $this->path; | ||
$contents = file_get_contents($file); | ||
|
||
$this->assertFileExists($file); | ||
$this->assertStringContainsString('# Data Object', $contents); | ||
$this->assertStringContainsString('modules/{Module}/Domain/DataObjects', $contents); | ||
$this->assertStringContainsString('beyond:make:data {name} {--force}', $contents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\DocumentationTest; | ||
|
||
use Tests\TestCase; | ||
|
||
class EnumTest extends TestCase | ||
{ | ||
protected string $path = '/docs/commands/enum.md'; | ||
|
||
public function testCorrectDocumentation(): void | ||
{ | ||
$file = beyond_path() . $this->path; | ||
$contents = file_get_contents($file); | ||
|
||
$this->assertFileExists($file); | ||
$this->assertStringContainsString('# Enum', $contents); | ||
$this->assertStringContainsString('modules/{Module}/Domain/Enum', $contents); | ||
$this->assertStringContainsString('beyond:make:enum {name} {--force}', $contents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\DocumentationTest; | ||
|
||
use Tests\TestCase; | ||
|
||
class EventTest extends TestCase | ||
{ | ||
protected string $path = '/docs/commands/event.md'; | ||
|
||
public function testCorrectDocumentation(): void | ||
{ | ||
$file = beyond_path() . $this->path; | ||
$contents = file_get_contents($file); | ||
|
||
$this->assertFileExists($file); | ||
$this->assertStringContainsString('# Event', $contents); | ||
$this->assertStringContainsString('modules/{Module}/Domain/Events', $contents); | ||
$this->assertStringContainsString('beyond:make:event {name} {--force}', $contents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\DocumentationTest; | ||
|
||
use Tests\TestCase; | ||
|
||
class JobTest extends TestCase | ||
{ | ||
protected string $path = '/docs/commands/job.md'; | ||
|
||
public function testCorrectDocumentation(): void | ||
{ | ||
$file = beyond_path() . $this->path; | ||
$contents = file_get_contents($file); | ||
|
||
$this->assertFileExists($file); | ||
$this->assertStringContainsString('# Job', $contents); | ||
$this->assertStringContainsString('modules/{Module}/App/Jobs', $contents); | ||
$this->assertStringContainsString('beyond:make:job {name} {--sync} {--force}', $contents); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\DocumentationTest; | ||
|
||
use Tests\TestCase; | ||
|
||
class ListenerTest extends TestCase | ||
{ | ||
protected string $path = '/docs/commands/listener.md'; | ||
|
||
public function testCorrectDocumentation(): void | ||
{ | ||
$file = beyond_path() . $this->path; | ||
$contents = file_get_contents($file); | ||
|
||
$this->assertFileExists($file); | ||
$this->assertStringContainsString('# Listener', $contents); | ||
$this->assertStringContainsString('modules/{Module}/App/Listeners', $contents); | ||
$this->assertStringContainsString('beyond:make:listener {name} {--force}', $contents); | ||
} | ||
} |