当前位置: 首页>>代码示例>>PHP>>正文


PHP str::title方法代码示例

本文整理汇总了PHP中str::title方法的典型用法代码示例。如果您正苦于以下问题:PHP str::title方法的具体用法?PHP str::title怎么用?PHP str::title使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在str的用法示例。


在下文中一共展示了str::title方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkErf

 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function checkErf($street)
 {
     // dynamically change database
     $userDB = Auth::user()->suburb;
     $otf = new \App\Database\OTF(['database' => $userDB]);
     $db = DB::connection($userDB);
     // check database type
     $databaseType = Auth::user()->suburb_type;
     if ($databaseType == 1) {
         $freeholds_table = "tblSuburbOwners";
         $freeholds_table_key = $freeholds_table . ".numErf";
         $freeholds_identity = $freeholds_table . ".strIdentity";
         $mem_Table = "tblErfNumbers";
         $mem_key = "tblErfNumbers.numErf";
     }
     if ($databaseType == 2) {
         $freeholds_table = "tblSuburbOwners";
         $freeholds_table_key = $freeholds_table . ".strKey";
         $freeholds_identity = $freeholds_table . ".strIdentity";
         $mem_Table = "tblFHPropertyID";
         $mem_key = $mem_Table . ".strKey";
     }
     if ($databaseType == 3) {
         $freeholds_table = "tblSuburbOwners";
         $freeholds_table_key = $freeholds_table . ".strKey";
         $freeholds_identity = $freeholds_table . ".strIdentity";
         $mem_Table = "tblFHPropertyID";
         $mem_key = $mem_Table . ".strKey";
     }
     $streets = $db->table($freeholds_table)->Join($mem_Table, $freeholds_table_key, '=', $mem_key)->Join('tblSuburbContactNumbers', $freeholds_identity, '=', 'tblSuburbContactNumbers.strIDNumber')->orderBy('strStreetName', 'asc')->orderBy('strStreetNo', 'asc')->orderBy($freeholds_table . '.strComplexName', 'asc')->orderBy($freeholds_table . '.strComplexNo', 'asc')->orderBy($freeholds_table . '.strKey', 'asc')->select('*')->groupby($freeholds_table . '.ID')->where($freeholds_table . '.numErf', $street)->paginate(1);
     // format phone and currency
     foreach ($streets as $value) {
         $value->strHomePhoneNo = helpers::phoneFormat($value->strHomePhoneNo);
         $value->strWorkPhoneNo = helpers::phoneFormat($value->strWorkPhoneNo);
         $value->strCellPhoneNo = helpers::phoneFormat($value->strCellPhoneNo);
         $value->strAmount = helpers::currencyFormat($value->strAmount);
         $value->strBondAmount = helpers::currencyFormat($value->strBondAmount);
         $value->strSurname = str::title($value->strSurname);
         $value->strFirstName = str::title($value->strFirstName);
     }
     // log
     $radio = 'checkErf';
     $append = Auth::user()->name . "    " . \Carbon\Carbon::now()->toDateTimeString() . "    " . 'streetscontroller ' . $radio . "    " . $street . "    " . $userDB;
     Storage::append('logfile.txt', $append);
     return view('pages.streets1', compact('streets', 'street'));
     dd('checkgrid streetcontroller', $street);
 }
开发者ID:bikedel,项目名称:farmbook,代码行数:52,代码来源:StreetsController.php


注:本文中的str::title方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。