<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class RoutesCategory extends BaseModel
{
	protected $table='system_routes_category';
	function getCode(){
	    $data=$this->orderby('sort','desc')->get();
        if(!$data){
            return -6010000122;
        }
        return $data->toArray();
    }

    function getRole($id){
        $data=$this->where('id',$id)->first();
        if(!$data){
            return -7050001204;
        }
        return $data->toArray();
    }
    

}