Skip to content

Commit 811d202

Browse files
committed
guide editing & fixes
1 parent 7a212f2 commit 811d202

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

docs/guide/index.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ For now, just ignore `@click` code, we'll explain it later. Next goes `group fil
154154

155155
<img src="https://static.awes.io/docs/guide/02_filter_group_component.png" alt="Awes.io">
156156

157-
If we click on one of the filters, we'll see that it modifies `is_public` URL's parameter to respective value. Our component tracks these changes and sends server requests to get filtered data. We return to this topic later when will be creating additional filters ourselves.
157+
If we click on one of the filters, we'll see that it modifies `is_public` URL's parameter to respective value. Our component tracks these changes and sends server requests to get filtered data.
158+
159+
> In the future, you will often be able to observe similar behavior in many front-end components. All because, we have such a concept as the `page's state`, implemented through the `GET` parameters which are used to update the data based on their values. We return to this topic later when will be creating additional filters ourselves.
158160
159161
Moving on, we can see one more very useful component - `context menu`, which in this case, controls the ordering of our leads by their names.
160162

@@ -347,7 +349,7 @@ as you can see we've added `sort` property to a respective table column, this wi
347349

348350
<img src="https://static.awes.io/docs/guide/12_column_sorting_controls.png" alt="Awes.io">
349351

350-
To make them work. we need to add `status` parameter to `$orderable` model property:
352+
To make them work, we need to add `status` parameter to `$orderable` model property:
351353

352354
```php
353355
public $orderable = ['name', 'status'];
@@ -491,7 +493,7 @@ Let's create a form request class using Artisan command:
491493
php artisan make:request '\App\Sections\Leads\Requests\StoreLead'
492494
```
493495

494-
And add some basic validation rules into it:
496+
Add some basic validation rules into it:
495497

496498
```php
497499
return [
@@ -500,7 +502,18 @@ return [
500502
];
501503
```
502504

503-
That's all, now any validation errors will be displayed.
505+
And type-hint it into the controller's `store` method:
506+
507+
```php
508+
use App\Sections\Leads\Requests\StoreLead;
509+
...
510+
public function store(StoreLead $request)
511+
...
512+
```
513+
514+
That's all, now any validation errors will be displayed:
515+
516+
<img src="https://static.awes.io/docs/guide/18_validation_errors.png" alt="Awes.io">
504517

505518
<!-- ## Custom filters -->
506519

0 commit comments

Comments
 (0)