laravel-learn-bbs/app/Http/Controllers/Api/Controller.php

19 lines
410 B
PHP
Raw Normal View History

2018-06-03 08:11:51 +00:00
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller as BaseController;
use Dingo\Api\Routing\Helpers;
2018-06-16 01:15:01 +00:00
use Symfony\Component\HttpKernel\Exception\HttpException;
2018-06-03 08:11:51 +00:00
class Controller extends BaseController
{
use Helpers;
2018-06-16 01:15:01 +00:00
public function errorResponse($statusCode, $message = '', $code = 0)
{
throw new HttpException($statusCode, $message, null, [], $code);
}
2018-06-03 08:11:51 +00:00
}