Skip to content

Commit

Permalink
Merge pull request #113 from asharifineyestani/main
Browse files Browse the repository at this point in the history
minor modify
  • Loading branch information
freekmurze authored Mar 9, 2023
2 parents 296a27f + 65051c8 commit b86b0e5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ return [
];
```

For controllers outside of the applications root namespace directories can also be added using a `namespace => path` pattern in the directories array. In the following example controllers from `Modules\Admin\Http\Controllers` will be included.
For controllers outside the applications root namespace directories can also be added using a `namespace => path` pattern in the directories array. In the following example controllers from `Modules\Admin\Http\Controllers` will be included.

```php
'directories' => [
Expand Down Expand Up @@ -347,7 +347,7 @@ your subdomain will be different on your development environment to your product
// config/domains.php
return [
'main' => env('SITE_URL', 'example.com'),
'subdomain' => env('SUBDOMAIN_URL', 'subdomain.exmaple.com')
'subdomain' => env('SUBDOMAIN_URL', 'subdomain.example.com')
];
```

Expand Down Expand Up @@ -400,7 +400,7 @@ Route::get('/users/{user}/posts/{post}', function (User $user, Post $post) {

You can also use the annotation on controllers to enable implicitly scoped bindings for all its methods.

### Specifying wheres
### Specifying where

You can use the `Where` annotation on a class or method to constrain the format of your route parameters.

Expand Down
24 changes: 12 additions & 12 deletions src/ClassRouteAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(
*/
public function prefix(): ?string
{
/** @var \Spatie\RouteAttributes\Attributes\Prefix $attribute */
/** @var Prefix $attribute */
if (! $attribute = $this->getAttribute(Prefix::class)) {
return null;
}
Expand All @@ -39,7 +39,7 @@ public function prefix(): ?string
*/
public function domain(): ?string
{
/** @var \Spatie\RouteAttributes\Attributes\Domain $attribute */
/** @var Domain $attribute */
if (! $attribute = $this->getAttribute(Domain::class)) {
return null;
}
Expand All @@ -52,7 +52,7 @@ public function domain(): ?string
*/
public function domainFromConfig(): ?string
{
/** @var \Spatie\RouteAttributes\Attributes\DomainFromConfig $attribute */
/** @var DomainFromConfig $attribute */
if (! $attribute = $this->getAttribute(DomainFromConfig::class)) {
return null;
}
Expand Down Expand Up @@ -94,7 +94,7 @@ public function groups(): array
*/
public function resource(): ?string
{
/** @var \Spatie\RouteAttributes\Attributes\Resource $attribute */
/** @var Resource $attribute */
if (! $attribute = $this->getAttribute(Resource::class)) {
return null;
}
Expand All @@ -107,7 +107,7 @@ public function resource(): ?string
*/
public function parameters(): array | string | null
{
/** @var \Spatie\RouteAttributes\Attributes\Resource $attribute */
/** @var Resource $attribute */
if (! $attribute = $this->getAttribute(Resource::class)) {
return null;
}
Expand All @@ -120,7 +120,7 @@ public function parameters(): array | string | null
*/
public function shallow(): bool | null
{
/** @var \Spatie\RouteAttributes\Attributes\Resource $attribute */
/** @var Resource $attribute */
if (! $attribute = $this->getAttribute(Resource::class)) {
return null;
}
Expand All @@ -133,7 +133,7 @@ public function shallow(): bool | null
*/
public function apiResource(): ?string
{
/** @var \Spatie\RouteAttributes\Attributes\Resource $attribute */
/** @var Resource $attribute */
if (! $attribute = $this->getAttribute(Resource::class)) {
return null;
}
Expand All @@ -146,7 +146,7 @@ public function apiResource(): ?string
*/
public function except(): string | array | null
{
/** @var \Spatie\RouteAttributes\Attributes\Resource $attribute */
/** @var Resource $attribute */
if (! $attribute = $this->getAttribute(Resource::class)) {
return null;
}
Expand All @@ -159,7 +159,7 @@ public function except(): string | array | null
*/
public function only(): string | array | null
{
/** @var \Spatie\RouteAttributes\Attributes\Resource $attribute */
/** @var Resource $attribute */
if (! $attribute = $this->getAttribute(Resource::class)) {
return null;
}
Expand All @@ -172,7 +172,7 @@ public function only(): string | array | null
*/
public function names(): string | array | null
{
/** @var \Spatie\RouteAttributes\Attributes\Resource $attribute */
/** @var Resource $attribute */
if (! $attribute = $this->getAttribute(Resource::class)) {
return null;
}
Expand All @@ -185,7 +185,7 @@ public function names(): string | array | null
*/
public function middleware(): array
{
/** @var \Spatie\RouteAttributes\Attributes\Middleware $attribute */
/** @var Middleware $attribute */
if (! $attribute = $this->getAttribute(Middleware::class)) {
return [];
}
Expand All @@ -195,7 +195,7 @@ public function middleware(): array

public function scopeBindings(): bool
{
/** @var \Spatie\RouteAttributes\Attributes\ScopeBindings $attribute */
/** @var ScopeBindings $attribute */
if (! $attribute = $this->getAttribute(ScopeBindings::class)) {
return false;
}
Expand Down

0 comments on commit b86b0e5

Please sign in to comment.