Skip to content

Commit e6b7df6

Browse files
authored
Update README.md
1 parent f70b3d0 commit e6b7df6

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Route::get(/article/{id}', ['uses' => 'ArticlePageController@asView']);
7676
protected function getContextData($request, $column = []){}
7777
```
7878
The method responsible for obtaining data from the database. <br>
79-
By default, there will be an attempt to get the model by the parameter ** id ** from the route
79+
By default, there will be an attempt to get the model by the parameter **id** from the route
8080

8181
But you can override this behavior by overloading this method. It must return an array with a context name key and an object of the model.
8282

@@ -93,11 +93,10 @@ protected function getContextData($request, $column = []) {
9393
Or override get method
9494

9595
```php
96-
97-
public function get($request, $name) {
98-
$context = $this->getContextData($request, ['name' => $name]);
99-
return $this->renderToResponse($context);
100-
}
96+
public function get($request, $name) {
97+
$context = $this->getContextData($request, ['name' => $name]);
98+
return $this->renderToResponse($context);
99+
}
101100
```
102101
Supported methods correspond to request types.
103102

@@ -116,7 +115,7 @@ The following parameters can be those that you defined in your routes.
116115

117116
### View Name
118117

119-
By default, DetailController will search for a view with the name of the "art-page-class" class new, and you will also be able to override it in the **templateName** method
118+
By default, DetailController will search for a view with the name of the "article-page" class new, and you will also be able to override it in the **templateName** method
120119

121120
Note the auxiliary methods **templatePrefix** and **templateSuffix**. <br>
122121
If you define them, the data will be appended to the name of the view returned by the method **templateName**
@@ -180,4 +179,4 @@ Route::get(/blog', ['uses' => 'BlogPageController@asView']);
180179
By default, the name of the view will be appended with the suffix **- list**, but you can undo or override this behavior in the corresponding method, of course.
181180

182181
## P.S.
183-
This is a small set of possibilities. But I think in the future I will expand it if necessary.
182+
This is a small set of possibilities. But I think in the future I will expand it if necessary.

0 commit comments

Comments
 (0)