No Description

Controller.php 511B

12345678910111213141516
  1. <?php namespace App\Http\Controllers;
  2. use Illuminate\Foundation\Bus\DispatchesCommands;
  3. use Illuminate\Routing\Controller as BaseController;
  4. use Illuminate\Foundation\Validation\ValidatesRequests;
  5. use App\Error;
  6. abstract class Controller extends BaseController {
  7. use DispatchesCommands, ValidatesRequests;
  8. public static function returnValue($data=[],$errorNo=0) {
  9. return ["rst" => $data, "errno"=>$errorNo.'', "err"=>Error::getError($errorNo).'', "timestamp"=>intval(microtime(true)).''];
  10. }
  11. }