mirror of
https://github.com/Fechin/reference.git
synced 2026-11-21 05:24:10 +03:00
📝 docs(laravel.md): update HTTP Exceptions section to include additional examples and improve readability
💡 refactor(laravel.md): reformat code examples in the HTTP Exceptions section for better clarity and consistency
This commit is contained in:
1 parent
460e1878bb
commit
4b94feacfe
1 file changed
+14
-5
@@ -471,11 +471,20 @@ public function isValid($value)
|
||||
```
|
||||
Report an exception but continue handling the current request
|
||||
|
||||
### HTTP Exceptions
|
||||
```php
|
||||
// page not found
|
||||
abort(404);
|
||||
```
|
||||
### HTTP Exceptions
|
||||
```php
|
||||
// page not found
|
||||
abort(404);
|
||||
|
||||
// Unauthorized
|
||||
abort(401);
|
||||
|
||||
// Forbidden
|
||||
abort(403);
|
||||
|
||||
// Server Error
|
||||
abort(500);
|
||||
```
|
||||
Generate an HTTP exception response using status code
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user