File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 1717 "php" : " ^8.0.2" ,
1818 "composer/composer" : " ^2.0.0" ,
1919 "composer/installers" : " ^1 || ^2" ,
20+ "larajax/larajax" : " dev-main" ,
2021 "doctrine/dbal" : " ^2.13.3|^3.1.4" ,
2122 "intervention/image" : " ^3.10" ,
2223 "jaybizzle/crawler-detect" : " ^1.3" ,
6768 }
6869 },
6970 "minimum-stability" : " dev" ,
70- "prefer-stable" : true
71+ "prefer-stable" : true ,
72+ "config" : {
73+ "allow-plugins" : {
74+ "composer/installers" : true
75+ }
76+ }
7177}
Original file line number Diff line number Diff line change 11<?php namespace October \Rain \Exception ;
22
3+ use Larajax \Contracts \AjaxExceptionInterface ;
4+
35/**
46 * AjaxException is considered a "smart error" and will send http code 406,
57 * so they can pass response contents.
68 *
79 * @package october\exception
810 * @author Alexey Bobkov, Samuel Georges
911 */
10- class AjaxException extends ExceptionBase
12+ class AjaxException extends ExceptionBase implements AjaxExceptionInterface
1113{
1214 /**
1315 * @var array contents of the response.
@@ -46,4 +48,12 @@ public function addContent(string $key, $val)
4648 {
4749 $ this ->contents [$ key ] = $ val ;
4850 }
51+
52+ /**
53+ * toAjaxData
54+ */
55+ public function toAjaxData (): array
56+ {
57+ return (array ) $ this ->contents ;
58+ }
4959}
You can’t perform that action at this time.
0 commit comments