blessing-skin-server/app/Http/Controllers/Controller.php

25 lines
543 B
PHP
Raw Normal View History

2016-09-03 23:50:55 +08:00
<?php
namespace App\Http\Controllers;
use Illuminate\Validation\Validator;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
class Controller extends BaseController
{
use DispatchesJobs, ValidatesRequests;
/**
* {@inheritdoc}
*/
protected function formatValidationErrors(Validator $validator)
{
2016-09-10 21:14:46 +08:00
return [
'errno' => 1,
'msg' => $validator->errors()->first()
];
2016-09-03 23:50:55 +08:00
}
}