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


PHP Str::title方法代码示例

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


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

示例1: setData

 public static function setData($input)
 {
     $Category = $input['id'] == NULL || !isset($input['id']) ? new Status() : Status::find($input['id']);
     $Category->status_name = Str::title($input['data']);
     $Category->status_desc = $input['description'];
     $Category->save();
     $action = $input['id'] == NULL || !isset($input['id']) ? 'Insert' : '<b>(' . $input['id'] . ')</b> Update';
     Log::write('Data', 'Status <b>' . $input['data'] . '</b> ' . $action . ' by ' . Auth::user()->username);
 }
开发者ID:farhan4648gul,项目名称:developer-side,代码行数:9,代码来源:Status.php

示例2: userSearchList

 public static function userSearchList($input)
 {
     $operator = stripos($input['searchval'], '*') ? 'LIKE' : '=';
     $val = str_replace("*", "", $input['searchval']);
     $refval = stripos($input['searchval'], '*') ? '%' . $val . '%' : $val;
     $allUser = User::left_join('users_profiles', 'users.userid', '=', 'users_profiles.userid')->where('icno', $operator, $refval)->or_where('fullname', $operator, $refval)->paginate(Config::get('system.pagination'));
     $datagrid = new Datagrid();
     $datagrid->setFields(array('userprofile/fullname' => Str::upper(Str::title(Lang::line('admin.fullname')->get()))));
     $datagrid->setFields(array('userprofile/emel' => Str::upper(Str::title(Lang::line('admin.activeemel')->get()))));
     $datagrid->setFields(array('userprofile/icno' => Str::upper(Str::title(Lang::line('admin.idno')->get()))));
     $datagrid->setFields(array('status' => Str::upper('Status')));
     $datagrid->setAction(Lang::line('global.edit')->get(), 'viewUser', true, array('userid'));
     $datagrid->setAction(Lang::line('global.delete')->get(), 'deleteAccount', true, array('userid'));
     $datagrid->setAction(Lang::line('global.reset')->get(), 'resetAccount', true, array('userid'));
     $datagrid->setTable('users', 'table table-bordered table-hover table-striped table-condensed');
     $datagrid->build($allUser, 'userid');
     return $datagrid->render();
 }
开发者ID:farhan4648gul,项目名称:developer-side,代码行数:18,代码来源:User.php

示例3: dataModeling

 public static function dataModeling()
 {
     $list = array('Select Model');
     $dataModel = glob('bundles/admin/models/data/*');
     $namespace = 'Admin/Models/Data';
     foreach ($dataModel as $folder) {
         if (is_dir($folder)) {
             $base = basename($folder);
             $namespace2 = $namespace . Str::title($base);
             $modelNode = glob($folder . '/*');
             foreach ($modelNode as $value) {
                 $class = basename($value, '.php');
                 $list[$namespace2 . '/' . $class] = $namespace2 . '/' . $class;
             }
         } else {
             $class = basename($folder, '.php');
             $list[$namespace . '/' . $class] = $namespace . '/' . $class;
         }
     }
     return $list;
 }
开发者ID:farhan4648gul,项目名称:developer-side,代码行数:21,代码来源:crapcrush.php

示例4: schema

 public static function schema($action, $module_slug)
 {
     try {
         // Does the schema task file exists?
         $schema_path = path('bundle') . $module_slug . DS . 'tasks' . DS . 'schema' . EXT;
         if (\Laravel\File::exists($schema_path)) {
             include_once $schema_path;
             // Does the class exists?
             $class = Str::title($module_slug . '_Schema_Task');
             if (class_exists($class)) {
                 $schema_class = new $class();
                 // The action is callable?
                 if (is_callable(array($schema_class, $action))) {
                     $schema_class->{$action}();
                     return true;
                 } else {
                     Log::error('Failed to run data schema for module ' . $module_slug . '. Schema action [' . $action . '] not found.');
                 }
             } else {
                 Log::error('Failed to run data schema for module ' . $module_slug . '. Schema class [' . $class . '] not found.');
             }
         }
         // we dont have task schema to run
         return true;
     } catch (\Exception $e) {
         Log::error($e->getMessage());
         return false;
     }
 }
开发者ID:juaniiie,项目名称:mwi,代码行数:29,代码来源:installer.php

示例5: post_step

 public function post_step()
 {
     $input = Input::get();
     if (!isset($input['stepid'])) {
         $logs = 'Add New Step ';
         $step = new Step();
     } else {
         $step = Step::find($input['stepid']);
         $logs = 'Edit Step ';
     }
     $step->step = Str::title($input['step']);
     $step->flowid = $input['flowid'];
     $step->parentid = $input['parentid'];
     $step->roleid = $input['roleid'];
     $step->page = $input['page'];
     $step->state = $input['state'];
     $step->timestamp();
     $step->save();
     Log::write('Modul', $logs . $input['step'] . ' by ' . Auth::user()->username);
     return Menu::flowtree($input['flowid']);
 }
开发者ID:farhan4648gul,项目名称:developer-side,代码行数:21,代码来源:modul.php

示例6: looper

 protected static function looper($child)
 {
     $structure = '';
     if (!empty($child)) {
         $structure .= '<ul class="nav nav-list" style="margin-left:60px;padding-left:0px;padding-right:0px;border-left-width:3px;border-left-style:solid;border-left-color:#000">';
         foreach ($child as $key => $value) {
             $structure .= '<li>';
             $structure .= '<a href="#" onclick="deleteStep(' . $key . ')"  data-toggle="tooltip" data-title="remove step" style="float:right">&nbsp;<i class="icon-remove-sign"></i></a>';
             $structure .= '<a href="#" onclick="editStep(' . $key . ')" style="float:right">&nbsp;<i class="icon-edit"></i></a>';
             $structure .= '<a href="#" onclick="addStep(' . $key . ')" data-toggle="modal" ><i class="icon-arrow-right"></i>&nbsp;' . Str::title($value['desc']) . '&nbsp;<i class="icon-plus-sign"></i></a>';
             $structure .= self::looper($value['child']);
             $structure .= '</li>';
         }
         $structure .= '</ul>';
     }
     return $structure;
 }
开发者ID:farhan4648gul,项目名称:developer-side,代码行数:17,代码来源:menu.php


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