1
我有一些自定義路線返回JSON與octoberCMS例外
Route::get('/files/', [
'as' => 'read',
'uses' => 'Myname\MyPlugin\Http\Controllers\[email protected]'
]);
某處在我的課我有一個函數來驗證路徑
private function getPath()
{
$path = Input::get('path');
if (!$path)
{
throw new MyException('parameter is missing. path required', 400);
}
return base_path().'/'.$path;
}
我已經設置了自定義錯誤處理程序與JSOM但它是OctoberCMS的錯誤處理程序,它以HTML格式呈現錯誤。
你知道一種方法來替換10CMS的默認錯誤處理程序的自定義嗎? 感謝