Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
amirHossein5 authored Jan 7, 2022
1 parent 15acf3a commit 3d69ed1
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ composer require amir-hossein5/laravel-routin
## Filters



| filter | description
| ----------------------------------------|---------------------------------------------------------------------------------------|
| uriStartsWith( string ) | where uri (/users/create) starts with something (here starts with **u** or **users**) |
Expand All @@ -55,14 +54,32 @@ composer require amir-hossein5/laravel-routin
## Getters

- [get()](#get)
- [getUri()](#getUri)
- [getParameters()](#getParameters)
- [getName()](#getName)

After filtering routes you need to get them by these methods:


### Getting routes manually

```php
use AmirHossein5\Routin\Facades\Routin;


Routin::routes()
->withoutParameter()
->get(fn ($route) => [
$route->uri => $route
])

// output

array:2 [▼
"user/create" => Illuminate\Routing\Route {#1109 ▶}
"book/{book}" => Illuminate\Routing\Route {#1108 ▶}
...
]
```

See available methods in [https://laravel.com/api/8.x/Illuminate/Routing/Route.html](https://laravel.com/api/8.x/Illuminate/Routing/Route.html)

### get()

```php
Expand Down

0 comments on commit 3d69ed1

Please sign in to comment.