示例#1
0
 /**
  * Parse the connection into an array of the name and read / write type.
  *
  * @param  string  $name
  * @return array
  */
 protected function parseConnectionName($name)
 {
     $name = $name ?: $this->getDefaultConnection();
     return Str::endsWith($name, ['::read', '::write']) ? explode('::', $name, 2) : [$name, null];
 }
示例#2
0
 /**
  * Determine if a given string ends with a given substring.
  *
  * @param  string  $haystack
  * @param  string|array  $needles
  * @return bool
  */
 function ends_with($haystack, $needles)
 {
     return Str::endsWith($haystack, $needles);
 }
示例#3
0
 /**
  * Test for string ends with
  * @param $haystack
  * @param $needle
  * @return bool
  */
 function str_ends_with($haystack, $needle)
 {
     return Str::endsWith($haystack, $needle);
 }