search

Home  >  Q&A  >  body text

What does this array expression mean?

 protected $databaseRule = [

        'hostname' => 'require',

        'database' => 'require',

        'hostport' => 'require|number',

        'username' => 'require',

        'prefix'   => 'require|regex:/^[a-z0-9] [_]{1}/',

    ];

    protected $databaseMssage = [

##%
金灶沐金灶沐1962 days ago1018

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2019-09-27 10:03:52

    The array key name is just an ordinary string. As for characters with special meanings added in the middle, such as dots, its meaning is defined by its user. It can be understood as the prefix

    reply
    0
  • Cancelreply