當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CustomField::all方法代碼示例

本文整理匯總了PHP中CustomField::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP CustomField::all方法的具體用法?PHP CustomField::all怎麽用?PHP CustomField::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CustomField的用法示例。


在下文中一共展示了CustomField::all方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct(CustomFields $customFieldsMangaer)
 {
     $this->customFieldsMangaer = $customFieldsMangaer;
     if (Request::ajax()) {
         $this->layout = 'backend.ajax_layout';
     }
     View::composer('backend.camposextra.layout', function ($view) {
         $data['camposextra'] = CustomField::all();
         $view->nest('sidebar', 'backend.camposextra.list', $data);
     });
 }
開發者ID:e-gob,項目名稱:api-instituciones-v2,代碼行數:11,代碼來源:CamposExtraController.php

示例2: getMetadatos

 public function getMetadatos($id_encabezado)
 {
     $encabezado = EstructuraEncabezado::find($id_encabezado);
     $customFields = CustomField::all();
     $data['encabezado'] = $encabezado;
     $data['custom_fields'] = $customFields;
     $this->layout->content = View::make('backend.estructuras.metadatos', $data);
 }
開發者ID:e-gob,項目名稱:api-instituciones-v2,代碼行數:8,代碼來源:EstructurasController.php

示例3: scopeTextSearch

 /**
  * Query builder scope to search on text for complex Bootstrap Tables API
  *
  * @param  Illuminate\Database\Query\Builder  $query  Query builder instance
  * @param  text                              $search    	 Search term
  *
  * @return Illuminate\Database\Query\Builder          Modified query builder
  */
 public function scopeTextSearch($query, $search)
 {
     $search = explode(' ', $search);
     return $query->where(function ($query) use($search) {
         foreach ($search as $search) {
             $query->whereHas('model', function ($query) use($search) {
                 $query->whereHas('category', function ($query) use($search) {
                     $query->where(function ($query) use($search) {
                         $query->where('categories.name', 'LIKE', '%' . $search . '%')->orWhere('models.name', 'LIKE', '%' . $search . '%');
                     });
                 });
             })->orWhere(function ($query) use($search) {
                 $query->whereHas('assetstatus', function ($query) use($search) {
                     $query->where('status_labels.name', 'LIKE', '%' . $search . '%');
                 });
             })->orWhere(function ($query) use($search) {
                 $query->whereHas('company', function ($query) use($search) {
                     $query->where('companies.name', 'LIKE', '%' . $search . '%');
                 });
             })->orWhere(function ($query) use($search) {
                 $query->whereHas('defaultLoc', function ($query) use($search) {
                     $query->where('locations.name', 'LIKE', '%' . $search . '%');
                 });
             })->orWhere(function ($query) use($search) {
                 $query->whereHas('assigneduser', function ($query) use($search) {
                     $query->where(function ($query) use($search) {
                         $query->where('users.first_name', 'LIKE', '%' . $search . '%')->orWhere('users.last_name', 'LIKE', '%' . $search . '%')->orWhere(function ($query) use($search) {
                             $query->whereHas('userloc', function ($query) use($search) {
                                 $query->where('locations.name', 'LIKE', '%' . $search . '%');
                             });
                         });
                     });
                 });
             })->orWhere('assets.name', 'LIKE', '%' . $search . '%')->orWhere('asset_tag', 'LIKE', '%' . $search . '%')->orWhere('serial', 'LIKE', '%' . $search . '%')->orWhere('order_number', 'LIKE', '%' . $search . '%')->orWhere('notes', 'LIKE', '%' . $search . '');
         }
         foreach (CustomField::all() as $field) {
             $query->orWhere($field->db_column_name(), 'LIKE', "%{$search}%");
         }
     });
 }
開發者ID:cralle,項目名稱:snipe-it,代碼行數:48,代碼來源:Asset.php

示例4: getAddcampoextra

 public function getAddcampoextra()
 {
     $data['camposextra'] = CustomField::all();
     return View::make('backend/customfields/selecttype', $data);
 }
開發者ID:e-gob,項目名稱:api-instituciones-v2,代碼行數:5,代碼來源:InstitucionesController.php


注:本文中的CustomField::all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。