]> BookStack Code Mirror - bookstack/blob - app/Exceptions/JsonDebugException.php
Adjusted API docs table
[bookstack] / app / Exceptions / JsonDebugException.php
1 <?php
2
3 namespace BookStack\Exceptions;
4
5 use Exception;
6
7 class JsonDebugException extends Exception
8 {
9     protected $data;
10
11     /**
12      * JsonDebugException constructor.
13      */
14     public function __construct($data)
15     {
16         $this->data = $data;
17     }
18
19     /**
20      * Covert this exception into a response.
21      */
22     public function render()
23     {
24         return response()->json($this->data);
25     }
26 }