本文整理汇总了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);
}
示例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();
}
示例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;
}
示例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;
}
}
示例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']);
}
示例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"> <i class="icon-remove-sign"></i></a>';
$structure .= '<a href="#" onclick="editStep(' . $key . ')" style="float:right"> <i class="icon-edit"></i></a>';
$structure .= '<a href="#" onclick="addStep(' . $key . ')" data-toggle="modal" ><i class="icon-arrow-right"></i> ' . Str::title($value['desc']) . ' <i class="icon-plus-sign"></i></a>';
$structure .= self::looper($value['child']);
$structure .= '</li>';
}
$structure .= '</ul>';
}
return $structure;
}