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


PHP Str::title方法代码示例

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


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

示例1: getEstadisticos

 public function getEstadisticos()
 {
     setlocale(LC_TIME, 'spanish');
     $mes = strftime("%B", mktime(0, 0, 0, date('m'), 1, 2000));
     $anio = date('Y');
     $pagos = Pago::where(DB::raw('YEAR(created_at)'), '=', date('Y'))->where(DB::raw('MONTH(created_at)'), '=', date('m'))->where('cancelado', 0)->sum('monto');
     $ventas = Venta::where(DB::raw('YEAR(fecha)'), '=', date('Y'))->where(DB::raw('MONTH(fecha)'), '=', date('m'))->where('cancelada', 0)->where('cotizacion', 0)->where('autorizado', 1)->groupby(DB::raw('YEAR(fecha)'), DB::raw('MONTH(fecha)'))->orderby('fecha')->sum('total');
     return Response::json(array("ventas" => number_format($ventas, 0, ".", ","), "ingresos" => number_format($pagos, 0, ".", ","), "mes" => Str::title($mes) . ' de ' . $anio));
 }
开发者ID:grupoim,项目名称:bifrost_free,代码行数:9,代码来源:VentaControlador.php

示例2: post_deleteGroup

 public function post_deleteGroup()
 {
     $groupid = Input::get('groupid');
     $name = Input::get('name');
     Group::getDataModel($groupid);
     $existed = Group::checkData();
     if (!$existed) {
         Group::find($groupid)->delete();
         Log::write('Data', 'Data Group<b>' . $name . '</b> Remove by ' . Auth::user()->username);
         return json_encode(Group::listData());
     } else {
         return json_encode(array('fail' => Str::title(Lang::line('admin.deletegroupfail')->get())));
     }
 }
开发者ID:farhan4648gul,项目名称:developer-side,代码行数:14,代码来源:data.php

示例3: breadcrumb

 /**
  * breadcrumb function
  * Create breadcrumb
  * @return string
  * @author joharijumali
  **/
 public static function breadcrumb()
 {
     $Menu = Admin_Menu::menuGenerator();
     $butternbread = array();
     foreach ($Menu as $floor => $packet) {
         foreach ($packet->page->action as $key => $action) {
             if ($packet->packet == Str::lower(URI::segment(1)) && $packet->controller->name == Str::lower(URI::segment(2)) && $action->name == Str::lower(URI::segment(3)) || URI::segment(3) == NULL && $action->name == $packet->controller->name && Str::lower(URI::segment(2)) == $packet->controller->name) {
                 $butternbread[Str::upper($packet->controller->alias)] = '#';
                 array_push($butternbread, Str::title($action->alias));
             }
         }
     }
     return Breadcrumb::create($butternbread);
 }
开发者ID:jigeeshup,项目名称:bootstrap-base-application,代码行数:20,代码来源:Navigator.php

示例4: render

 public static function render()
 {
     $rolelist = Admin_UserRole::all();
     $page = Acltree::datasource();
     //all();
     $acl = Admin_UserAcl::aclRegistered();
     $content = array();
     $fot = 1;
     foreach ($rolelist as $role) {
         $subcontent = '<h3>' . Str::upper($role->role . " Setup") . '</h3>';
         $subcontent .= '<ul class="nav nav-list">';
         foreach ($page as $controller => $selection) {
             $subcontent .= '<li class="nav-header"><i class="icon-hdd"></i>&nbsp;' . Str::upper($selection['alias']) . '</li>';
             $subcontent .= '<div class="row-fluid">';
             foreach ($selection['page'] as $action => $alias) {
                 $subcontent .= '<span style="padding-right:5px;width:auto;">';
                 $subcontent .= Form::hidden($role->role . '[id]', $role->roleid);
                 if (in_array($role->roleid, array_keys($acl)) && in_array($controller, array_keys($acl[$role->roleid])) && in_array($action, array_keys($acl[$role->roleid][$controller])) && $acl[$role->roleid][$controller][$action] == true) {
                     $subcontent .= Form::inline_labelled_checkbox($role->role . '[' . $controller . '][' . $action . ']', Str::title($alias), null, array('checked' => true, 'style' => 'padding:2px'));
                 } else {
                     $subcontent .= Form::inline_labelled_checkbox($role->role . '[' . $controller . '][' . $action . ']', $alias);
                 }
                 $subcontent .= '</span>';
             }
             $subcontent .= '</div >';
             $subcontent .= '<li class="divider"></li>';
         }
         $subcontent .= '</ul>';
         $active = $fot == 1 ? true : false;
         $fot++;
         array_push($content, array(Str::upper($role->role), $subcontent, $active));
     }
     $nav = Navigation::links($content);
     $tab = Tabbable::tabs_left($nav);
     return $tab;
 }
开发者ID:jigeeshup,项目名称:bootstrap-base-application,代码行数:36,代码来源:Acltree.php

示例5: get_extra

 public static function get_extra($module_slug)
 {
     $all_fields = self::where('module_slug', '=', $module_slug)->get();
     // Get all groups (Tabs)
     $groups = array();
     foreach ($all_fields as $field) {
         if (empty($field->value)) {
             $field->value = $field->default;
         }
         if (!isset($groups[$field->group])) {
             $groups[$field->group] = \Str::title(str_replace('_', ' ', $field->group));
         }
         // The field option is a function? if it is grab
         // what is needed func:\Navigation\Groups::title,slug
         if (starts_with($field->value, 'func:')) {
             $func = substr($field->value, 5);
             $func_parts = explode('.', $func);
             $arr = array('*');
             if (isset($func_parts['1'])) {
                 $arr = explode(',', $func_parts['1']);
             }
             $options_raw = call_user_func($func_parts['0'], $arr);
             // Build options array
             // array('header' => Header) (navigation) example
             $options = array();
             if (count($arr) > 1) {
                 foreach ($options_raw as $opt) {
                     $options[$opt->{$arr['0']}] = $opt->{$arr['1']};
                 }
             }
             $field->value = $options;
         }
     }
     $response = array('groups' => $groups, 'fields' => $all_fields);
     return $response;
 }
开发者ID:juaniiie,项目名称:mwi,代码行数:36,代码来源:field.php

示例6: function

<?php

// History
Breadcrumbs::register('admin.history.index', function (\DaveJamesMiller\Breadcrumbs\Generator $breadcrumbs) {
    $breadcrumbs->parent('dashboard');
    $breadcrumbs->push(Str::title(trans('history::global.name')), route('admin.history.index'));
});
Breadcrumbs::register('admin.history.edit', function (\DaveJamesMiller\Breadcrumbs\Generator $breadcrumbs, \TypiCMS\Modules\History\Models\History $history) {
    $breadcrumbs->parent('admin.history.index');
    $breadcrumbs->push($history->title, route('admin.history.edit', $history->id));
});
Breadcrumbs::register('admin.history.create', function (\DaveJamesMiller\Breadcrumbs\Generator $breadcrumbs) {
    $breadcrumbs->parent('admin.history.index');
    $breadcrumbs->push(trans('history::global.New'), route('admin.history.create'));
});
开发者ID:Ayoubblog,项目名称:TypiCMS,代码行数:15,代码来源:breadcrumbs.php

示例7: updateConfigure

 public function updateConfigure()
 {
     if (Input::has('pk')) {
         if (!Request::ajax()) {
             return App::abort(404);
         }
         return self::updateQuickEdit();
     } else {
         if (Request::ajax()) {
             $arrReturn = ['status' => 'error'];
             $configure = new Configure();
             $configure->cname = Input::get('cname');
             $configure->ckey = Input::get('ckey');
             if (Input::hasFile('cvalue')) {
                 $path = app_path('files');
                 if (!File::exists($path)) {
                     File::makeDirectory($path, 493, true);
                 }
                 $path = str_replace(['\\', '/'], DS, $path);
                 $file = Input::file('cvalue');
                 $file->move($path, $configure->ckey . '.' . $file->getClientOriginalExtension());
                 $configure->cvalue = $path . DS . $configure->ckey . '.' . $file->getClientOriginalExtension();
             } else {
                 $configure->cvalue = Input::get('cvalue');
             }
             $configure->cdescription = Input::get('cdescription');
             $configure->active = Input::has('active') ? 1 : 0;
             $pass = $configure->valid();
             if ($pass) {
                 $configure->save();
                 $arrReturn = ['status' => 'ok'];
                 $arrReturn['message'] = $configure->cname . ' has been saved';
                 $arrReturn['data'] = $configure;
             } else {
                 $arrReturn['message'] = '';
                 $arrErr = $pass->messages()->all();
                 foreach ($arrErr as $value) {
                     $arrReturn['message'] .= "{$value}\n";
                 }
             }
             $response = Response::json($arrReturn);
             $response->header('Content-Type', 'application/json');
             return $response;
         }
     }
     $arrPost = Input::all();
     unset($arrPost['_token']);
     foreach ($arrPost as $key => $value) {
         if (in_array($key, ['main_logo', 'favicon'])) {
             if (!Input::hasFile($key)) {
                 continue;
             }
             if ($key == 'main_logo') {
                 $path = public_path('assets' . DS . 'images' . DS . 'logos');
                 $width = 400;
                 $name = 'logo';
             } else {
                 if ($key == 'favicon') {
                     $path = public_path('assets' . DS . 'images' . DS . 'favicons');
                     $width = 16;
                     $name = 'favicon';
                 }
             }
             $configure = Configure::firstOrNew(['ckey' => $key]);
             $configure->ckey = $key;
             $configure->cname = Str::title(str_replace('_', ' ', $key));
             if (!empty($configure->cvalue) && File::exists(public_path($configure->cvalue))) {
                 File::delete(public_path($configure->cvalue));
             }
             $path = VIImage::upload(Input::file($key), $path, $width, false, $name);
             $path = str_replace(public_path() . DS, '', $path);
             $configure->cvalue = str_replace(DS, '/', $path);
             $configure->save();
         } else {
             $configure = Configure::firstOrNew(['ckey' => $key]);
             $configure->ckey = $key;
             $configure->cname = Str::title(str_replace('_', ' ', $key));
             $configure->cvalue = $value;
             $configure->save();
             if ($key == 'mask') {
                 Cache::tags('images')->flush();
                 Cache::forever('mask', $value);
             }
         }
     }
     return Redirect::to(URL . '/admin/configures')->with('flash_success', 'Main Configure has been saved.');
 }
开发者ID:nguyendaivu,项目名称:imagestock,代码行数:87,代码来源:ConfiguresController.php

示例8: generate

 public static function generate()
 {
     $admin = Arcone::getadministrator();
     $totalStruct = $struct = Arcone::getstructures();
     $structModeling = Admin_ModulPage::getRegPages();
     $totalStruct = Arcone::getallstructures();
     $view = '<ul class="nav nav-list">';
     foreach ($totalStruct as $modul => $content) {
         if (!empty($structModeling[$modul])) {
             $view .= '<li class="nav-header alert alert-info"><i class="icon-hdd"></i>&nbsp;' . Str::upper($modul) . '</li>';
             $view .= Form::hidden($modul . '[id]');
             $registered = !empty($structModeling[$modul]) ? 'alert alert-success' : 'alert';
             $view .= '<li class="' . $registered . '">';
             $idiv = count($content);
             foreach ($content as $submodul => $subcontent) {
                 if (isset($structModeling[$modul][$submodul])) {
                     $view .= '<ul class="nav nav-list">';
                     $view .= '<li style="height:30px" ><i class="icon-folder-close"></i>&nbsp;' . Str::title($submodul);
                     $submodulID = isset($structModeling[$modul][$submodul]) ? $structModeling[$modul][$submodul]['modulpageid'] : null;
                     $view .= Form::hidden($modul . '[' . $submodul . '][id]', $submodulID);
                     // 			$view .= '<div class="span6 form-inline pull-right" >';
                     // 			$submodulArrg = isset($structModeling[$modul][$submodul])?$structModeling[$modul][$submodul]['arrangement']:null;
                     // $view .= Form::mini_text($modul.'['.$submodul.'][arrangement]', $submodulArrg , array('class' => 'input-small',
                     // 	'style'=>'height:10px;width:10px;box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);background:none repeat scroll 0 0 rgba(0, 0, 0, 0.2);color:#fff','placeholder' => '#'));
                     // $submodulAlias = isset($structModeling[$modul][$submodul])? $structModeling[$modul][$submodul]['controlleralias']:'';
                     // $view .= Form::mini_text($modul.'['.$submodul.'][controlleralias]', $submodulAlias, array('class' => 'input-small','style'=>'height:10px;font-size:12px;','placeholder' => 'Alias'));
                     // $view .= '&nbsp;';
                     // $submodulVisible = isset($structModeling[$modul][$submodul])? $structModeling[$modul][$submodul]['visible']:0;
                     // $submodulVisibleChecked = ($submodulVisible == 1)? array('checked') : array();
                     // $view .= Form::labelled_checkbox($modul.'['.$submodul.'][show]', '<em><small>Show</small></em>',null,$submodulVisibleChecked);
                     // $view .= '&nbsp;';
                     // $submodulAuth = isset($structModeling[$modul][$submodul])? $structModeling[$modul][$submodul]['auth']:0;
                     // $submodulAuthChecked = ($submodulAuth == 1)? array('checked') : array();
                     // $view .= Form::labelled_checkbox($modul.'['.$submodul.'][auth]', '<em><small>Auth</small></em>',null,$submodulAuthChecked);
                     // $view .= '&nbsp;';
                     // $submodulAdmin = isset($structModeling[$modul][$submodul]['admin'])? $structModeling[$modul][$submodul]['admin']:0;
                     // $submodulAdminChecked = ($submodulAdmin == 1)? array('checked') : array();
                     // $view .= Form::labelled_checkbox($modul.'['.$submodul.'][admin]', '<em><small>Admin Only</small></em>',null,$submodulAdminChecked);
                     // $view .= '&nbsp;';
                     // 			$view .= '</div>';
                     $view .= '</li>';
                     $arrayBal = array();
                     $view .= '<li ><ul class="nav nav-list">';
                     foreach ($subcontent as $action) {
                         $registered = !isset($structModeling[$modul][$submodul][$action]) ? 'class ="alert" style="border:none;background-color:transparent;padding:0px;height:30px;margin-bottom:0px;" ' : 'style="height:30px" ';
                         $view .= '<li ' . $registered . '>';
                         $view .= '<i class="icon-list-alt "></i>&nbsp;' . Str::title($action) . '&nbsp;<em><small>' . Str::title($modul . '/' . $submodul . '/' . $action) . '</small></em>';
                         $actionID = isset($structModeling[$modul][$submodul][$action]) ? $structModeling[$modul][$submodul][$action]['modulpageid'] : null;
                         $view .= Form::hidden($modul . '[' . $submodul . '][' . $action . '][id]', $actionID);
                         $view .= '<div class="span6 form-inline pull-right" >';
                         $actionArrg = isset($structModeling[$modul][$submodul][$action]) ? $structModeling[$modul][$submodul][$action]['arrangement'] : null;
                         $view .= Form::mini_text($modul . '[' . $submodul . '][' . $action . '][arrangement]', $actionArrg, array('class' => 'input-small', 'style' => 'height:10px;width:10px', 'placeholder' => '#'));
                         $actionAlias = isset($structModeling[$modul][$submodul][$action]) ? $structModeling[$modul][$submodul][$action]['actionalias'] : '';
                         $view .= Form::mini_text($modul . '[' . $submodul . '][' . $action . '][actionalias]', $actionAlias, array('class' => 'input-small', 'style' => 'height:10px;font-size:12px;', 'placeholder' => 'Alias'));
                         $view .= '&nbsp;';
                         $actionVisible = isset($structModeling[$modul][$submodul][$action]) ? $structModeling[$modul][$submodul][$action]['visible'] : 0;
                         $actionVisibleChecked = $actionVisible == 1 ? array('checked') : array();
                         $view .= Form::labelled_checkbox($modul . '[' . $submodul . '][' . $action . '][show]', '<em><small>Show</small></em>', null, $actionVisibleChecked);
                         $view .= '&nbsp;';
                         $actionAuth = isset($structModeling[$modul][$submodul][$action]) ? $structModeling[$modul][$submodul][$action]['auth'] : 0;
                         $actionAuthChecked = $actionAuth == 1 ? array('checked') : array();
                         $view .= Form::labelled_checkbox($modul . '[' . $submodul . '][' . $action . '][auth]', '<em><small>Auth</small></em>', null, $actionAuthChecked);
                         $view .= '&nbsp;';
                         $actionAdmin = isset($structModeling[$modul][$submodul][$action]) ? $structModeling[$modul][$submodul][$action]['admin'] : 0;
                         $actionAdminChecked = $actionAdmin == 1 ? array('checked') : array();
                         $view .= Form::labelled_checkbox($modul . '[' . $submodul . '][' . $action . '][admin]', '<em><small>Admin Only</small></em>', null, $actionAdminChecked);
                         $view .= '&nbsp;';
                         $view .= '</div>';
                         $view .= '</li>';
                         unset($structModeling[$modul][$submodul][$action]);
                     }
                     $view .= '</ul></li>';
                     $idiv--;
                     if ($idiv != 0) {
                         $view .= '<li class="divider"></li>';
                     }
                     unset($structModeling[$modul][$submodul]['modulpageid']);
                     unset($structModeling[$modul][$submodul]['arrangement']);
                     unset($structModeling[$modul][$submodul]['controlleralias']);
                     unset($structModeling[$modul][$submodul]['visible']);
                     unset($structModeling[$modul][$submodul]['auth']);
                     unset($structModeling[$modul][$submodul]['admin']);
                     unset($structModeling[$modul][$submodul]['header']);
                     unset($structModeling[$modul][$submodul]['footer']);
                     if (!empty($structModeling[$modul][$submodul])) {
                         $view .= '<li class="alert-error">';
                         foreach ($structModeling[$modul][$submodul] as $deletedaction => $deletedcontent) {
                             $view .= '<ul class="nav nav-list">';
                             $view .= '<li>';
                             $view .= '<i class="icon-remove"></i>&nbsp;' . Str::title($deletedcontent['actionalias']) . '&nbsp;<em>' . $modul . '/' . $submodul . '/' . $deletedaction . '</em>';
                             $view .= Form::hidden($modul . '[' . $submodul . '][' . $deletedaction . '][id]', $deletedcontent['modulpageid']);
                             $view .= '<div class="span6 form-inline pull-right" >';
                             $view .= Form::labelled_checkbox($modul . '[' . $submodul . '][' . $deletedaction . '][remove]', '<em><small>Remove</small></em>');
                             $view .= '</div>';
                             $view .= '</li>';
                             $view .= '</ul >';
                             unset($structModeling[$modul][$submodul][$deletedaction]);
                         }
                         $view .= '</li>';
                     }
//.........这里部分代码省略.........
开发者ID:jigeeshup,项目名称:bootstrap-base-application,代码行数:101,代码来源:Menutree.php

示例9: status

 /**
  * Get the page's status
  * @return string
  */
 public function status()
 {
     return Str::title($this->status);
 }
开发者ID:jrafaelca,项目名称:Doptor,代码行数:8,代码来源:MenuPresenter.php

示例10: testStringCanBeConvertedToTitleCase

 /**
  * Test the Str::title method.
  *
  * @group laravel
  */
 public function testStringCanBeConvertedToTitleCase()
 {
     $this->assertEquals('Taylor', Str::title('taylor'));
     $this->assertEquals('Άχιστη', Str::title('άχιστη'));
 }
开发者ID:gilyaev,项目名称:framework-bench,代码行数:10,代码来源:str.test.php

示例11: index_post

 public function index_post($type)
 {
     $pageTitle = Str::title($type);
     $post_type = Post::post_type();
     $data = Post::where('type', $type)->latest('id')->get();
     return View::make('admin.post.ict_support', compact('data', 'pageTitle', 'post_type'));
 }
开发者ID:selimppc,项目名称:ecies,代码行数:7,代码来源:AdminController.php

示例12: fire

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     // How many alerts to request from mongo
     $count = Config::get('kuu.cron_batch_size');
     // KUU Email Settings
     $email_from_address = Config::get('kuu.email_from_address');
     $email_from_name = Config::get('kuu.email_from_name');
     $email_bcc = Config::get('kuu.email_bcc');
     // time in seconds, how often to notify
     $alert_interval_24hrs = Config::get('kuu.alert_interval_24hrs');
     // 20 mins
     $alert_interval_over_24hrs = Config::get('kuu.alert_interval_over_24hrs');
     // a day
     $http_error_descriptions = Config::get('kuu.http_error_descriptions');
     $url = Config::get('kuu.apiurl') . '/rest/popalerts?api_key=' . Config::get('kuu.apikey') . '&count=' . $count;
     $browser = new Buzz\Browser();
     $response = $browser->get($url);
     $response_array = json_decode($response->getContent());
     //$checkAlertEmail = new CheckAlertEmail();
     if (isset($response_array->Result) && $response_array->Result == 'OK') {
         $mail_counter = 0;
         foreach ($response_array->Records as $record_id => $record) {
             $record->time_formatted = date("m/d H:i:s T", $record->timestamp - $record->downtime);
             $record->title = 'Site is ' . Str::title($record->type);
             // $this->info('Record '.print_r($record, TRUE));
             $alert_emails = CheckAlertEmail::getAlertEmailsByMongoId($record->check_id);
             //				$alert_emails = CheckAlertEmail::getAlertEmailsByMongoId('5357d420685fabd7490000a4');
             // $this->info('Alert Emails '.print_r($alert_emails, TRUE));
             //DB::select('SELECT * FROM checks LEFT JOIN checks_alert_email USING (check_id)
             //	LEFT JOIN users ON checks_alert_email.user_id=users.id WHERE mongo_id = ?',
             //	array('5322c33f3cdffe9926000099'));
             //	array($record->check_id));
             foreach ($alert_emails as $id => $email) {
                 // $this->info('Alert email '.print_r($alert_emails, TRUE));
                 $since_last_time = time() - strtotime($email->last_sent . " GMT");
                 $times_sent = $email->times_sent;
                 // $this->info('since_last_time '.$since_last_time.' '.$times_sent.' '.$alert_interval_24hrs.' '.$alert_interval_over_24hrs);
                 // $this->info('down since '.$record->downtime.' '. (24*60*60) .'seconds in a day ' . $email_from_address.' '.$email_from_name);
                 $isDown = $record->type == 'down';
                 $trigger_send = false;
                 // if total downtime less than a day, use $alert_interval_24hrs, otherwise use
                 if ($record->downtime < 24 * 60 * 60 && $since_last_time >= $alert_interval_24hrs) {
                     $trigger_send = true;
                 } elseif ($record->downtime >= 24 * 60 * 60 && $since_last_time >= $alert_interval_over_24hrs) {
                     $trigger_send = true;
                 }
                 if ($trigger_send || !$isDown) {
                     //$this->info($email->alert_email.' '.$email->first_name.' '.$email->last_name);
                     $record->alert_email = $email;
                     $record->protocol = $email->type;
                     $record->http_error_descriptions = $http_error_descriptions;
                     $email->subject = $record->title . " - " . $email->url . " - " . $email->type;
                     $email->from_address = $email_from_address;
                     $email->from_name = $email_from_name;
                     $email->bcc_admin = $email_bcc;
                     Mail::send('emails.cronalert', (array) $record, function ($message) use($email) {
                         $message->from($email->from_address, $email->from_name);
                         // Remove To email name, you can set alerts to go to 3rd parties, name won't be valid
                         // $message->to($email->alert_email, $email->first_name.' '.$email->last_name)
                         $message->to($email->alert_email)->subject($email->subject);
                         foreach ($email->bcc_admin as $e) {
                             $message->bcc($e);
                         }
                         //$message->to('andrei.tsygankov@gmail.com', 'Andrei Tsygankov')->subject('Alerts');
                     });
                     $mail_counter++;
                     //$this->info($email->alert_id.' '.$record->type.' '.$email->last_name);
                     if ($isDown) {
                         CheckAlertEmail::where('alert_id', $email->alert_id)->update(array('last_sent' => gmdate("Y-m-d H:i:s"), 'times_sent' => $times_sent + 1));
                     } else {
                         CheckAlertEmail::where('alert_id', $email->alert_id)->update(array('last_sent' => '0000-00-00 00:00:00', 'times_sent' => 0));
                     }
                 }
             }
             // just send to admin
             /*
             if(!count($alert_emails)) {
             	Mail::send('emails.cronalert', (array)$record, function($message)
             	{
             		$message->from('noreply@dev.keepusup.com', 'KeepUsUp');
             	    $message->to('andrei.tsygankov@gmail.com', 'Admin')
             	    	->subject('Alerts')					    	
             	    	//->cc('harrison.hung@gmail.com')
             	    	;
             	});
             	$mail_counter++;
             }
             */
         }
         $this->info('Successfully sent ' . $mail_counter . ' emails');
     } else {
         if (isset($response_array->Result)) {
             $this->info('Failed with result=' . $response_array->Result);
         } else {
             $this->info('Failed with to fetch REST API data');
//.........这里部分代码省略.........
开发者ID:jinxiao8942,项目名称:laravel-kuu,代码行数:101,代码来源:CronPopAlerts.php

示例13: isset

@foreach($main_links as $menu_title => $menu_item)
    <?php 
$menu_title = Str::title(str_replace('_', ' ', $menu_title));
?>
    <?php 
//if this is > 1 means it is a group of items for a menu
?>
    <?php 
if (count($menu_item) > 1) {
    ?>
    <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown" href="{{ URL::base().'/'.ADM_URI.'/' }}"> {{ $menu_title }} <b class="caret"></b></a>
        
        {{ themes\render_admin_sub_menu_items($menu_item, 'class="dropdown-menu"') }}
    </li>
    <?php 
} else {
    ?>
    <?php 
    $menu_url = isset($menu_item['0']['url']) ? $menu_item['0']['url'] : '#';
    ?>
    <li class="{{ isset($menu_item['0']['li_class']) ? $menu_item['0']['li_class'] : '' }}"><a href="{{ URL::base().'/'.ADM_URI.'/'. $menu_url }}" class="{{ isset($menu_item['0']['class']) ? $menu_item['0']['class'] : '' }}">{{ $menu_title }}</a></li>
    <?php 
}
?>
@endforeach        
   
开发者ID:juaniiie,项目名称:mwi,代码行数:26,代码来源:admin_nav.blade.php

示例14: get_show

 public function get_show($tag)
 {
     $paintings = Tag::where('name', '=', $tag)->first()->paintings()->paginate(Config::get('app.paginator_count'));
     return View::make('tags.show')->with('title', HtmlHelpers::name('tags') . ' - ' . Str::title($tag))->with('nav', 'work')->with('tag', $tag)->with('paintings', $paintings);
 }
开发者ID:jvillasante,项目名称:cubanartjb,代码行数:5,代码来源:tags.php

示例15: updateEmail

 public function updateEmail()
 {
     if (!Request::isMethod('post')) {
         return App::abort(404);
     }
     $arrPost = Input::all();
     unset($arrPost['_token']);
     foreach ($arrPost as $key => $value) {
         $key = 'email_' . $key;
         $configure = Configure::firstOrNew(['ckey' => $key]);
         $configure->ckey = $key;
         $configure->cname = Str::title(str_replace('email_', ' ', $key));
         $configure->cvalue = $value;
         $configure->save();
     }
     return Redirect::to(URL . '/admin/email-templates')->with('flash_success', 'Email Configure has been saved.');
 }
开发者ID:nguyendaivu,项目名称:imagestock,代码行数:17,代码来源:EmailTemplatesController.php


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