Skip to content

Commit fef4ff3

Browse files
authored
add <?php for PHP file
1 parent 258dfb5 commit fef4ff3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/addons/jwt.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ To use JWT Authentication, you need additional setup and configuration.
3333
2. Copy the **AuthJWT.php** from **vendor/codeigniter4/shield/src/Config/** into your project's config folder and update the namespace to `Config`. You will also need to have these classes extend the original classes. See the example below.
3434

3535
```php
36-
// new file - app/Config/AuthJWT.php
3736
<?php
38-
37+
38+
// app/Config/AuthJWT.php
39+
3940
declare(strict_types=1);
4041

4142
namespace Config;
@@ -140,7 +141,10 @@ $routes->post('auth/jwt', '\App\Controllers\Auth\LoginController::jwtLogin');
140141
```
141142

142143
```php
144+
<?php
145+
143146
// app/Controllers/Auth/LoginController.php
147+
144148
declare(strict_types=1);
145149

146150
namespace App\Controllers\Auth;
@@ -260,6 +264,7 @@ file itself:
260264
$routes->group('api', ['filter' => 'jwt'], static function ($routes) {
261265
// ...
262266
});
267+
263268
$routes->get('users', 'UserController::list', ['filter' => 'jwt']);
264269
```
265270

0 commit comments

Comments
 (0)