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


PHP Eloquent::__construct方法代码示例

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


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

示例1: __construct

 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     $this->primaryKey = Config::get('wordpress-auth-laravel::auth.id');
     $this->table = Config::get('wordpress-auth-laravel::auth.table');
     $this->hidden = array(Config::get('wordpress-auth-laravel::auth.password'));
 }
开发者ID:shankargiri,项目名称:Quantum-Vic-La-Trobe-L4,代码行数:7,代码来源:User.php

示例2: __construct

 public function __construct(array $attributes = array())
 {
     // $db_fields_to_import = DaisyconHelper::db_fields_to_import();
     // $custom_db_fields_to_import = Config::get('daisycon.custom_db_fields_to_import');
     $this->fillable(array_merge(DaisyconHelper::getDatabaseFields(), array('program_id', 'feed_id', 'custom_categorie')));
     parent::__construct($attributes);
 }
开发者ID:bahjaat,项目名称:daisycon,代码行数:7,代码来源:Data.php

示例3: __construct

 /**
  * Construct
  * 
  * @param array   $attributes
  * @param boolean $exists
  */
 public function __construct($attributes = array(), $exists = false)
 {
     parent::__construct($attributes, $exists);
     // Set the prefix
     $prefix = \Config::get('verify::verify.prefix');
     $this->prefix = $prefix ? $prefix . '_' : '';
 }
开发者ID:marmaray,项目名称:OLD-laravel-France-website,代码行数:13,代码来源:eloquentverifybase.php

示例4: __construct

 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
     $this->errors = new \Illuminate\Support\MessageBag();
     $this->validator = \App::make('validator');
     $this->manejaConcurrencia = true;
 }
开发者ID:richarrieta,项目名称:miequipo,代码行数:7,代码来源:BaseModel.php

示例5: __construct

 /**
  * Create a new Eloquent model instance.
  *
  * @param  array  $attributes
  * @return void
  */
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     // Set the prefix
     $this->prefix = \Config::get('leback-auth::prefix', 'test');
     $this->table = $this->prefix . $this->getTable();
 }
开发者ID:gxela,项目名称:leback-auth,代码行数:13,代码来源:BaseModel.php

示例6: __construct

 public function __construct(array $attributes = array())
 {
     $this->hasAttachedFile('avatar', ['styles' => ['medium' => '300x300', 'thumbCrop' => '120x120#']]);
     $this->hasAttachedFile('cover', ['styles' => ['standard' => '1200x250', 'standardCrop' => '1200x250#']]);
     $this->hasAttachedFile('presentation_cover', ['styles' => ['standard' => '1200']]);
     parent::__construct($attributes);
 }
开发者ID:itsfamestudio,项目名称:hashtag,代码行数:7,代码来源:Board.php

示例7: __construct

 public function __construct($attributes = array())
 {
     parent::__construct($attributes);
     if ($this->useSti()) {
         $this->setAttribute($this->stiClassField, get_class($this));
     }
 }
开发者ID:WillyMaciel,项目名称:fwt,代码行数:7,代码来源:BaseModel.php

示例8: __construct

 /**
  * Prefixes any tables that need it
  */
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     static::$dbprefix = \Config::get('empower::dbprefix');
     // Change any unique:table_name or exists:table_name to prefixed table names
     static::$rules = preg_replace(array('/exists:(?:' . static::$dbprefix . '|)/', '/unique:(?:' . static::$dbprefix . '|)/'), array('exists:' . static::$dbprefix, 'unique:' . static::$dbprefix), static::$rules);
     $this->table = static::$dbprefix . $this->table;
 }
开发者ID:sorora,项目名称:empower,代码行数:11,代码来源:SupportModel.php

示例9: __construct

 /**
  * Create a new Eloquent model instance.
  *
  * @param array $attributes
  * @return void
  */
 public function __construct(array $attributes = array())
 {
     /**
      * The database table used by the model.
      */
     $this->table = \Config::get('gponster/laravel-facebook-sdk::profile.table');
     parent::__construct($attributes);
 }
开发者ID:gponster,项目名称:laravel-facebook-sdk,代码行数:14,代码来源:Profile.php

示例10: __construct

 /**
  * Create a new Eloquent model instance, ensuring that any auditing
  * columns are guarded.
  *
  * @param  array  $attributes
  * @return void
  */
 public function __construct(array $attributes = array())
 {
     // if we're using the auditing trait, guard the audit columns
     $reflection = new \ReflectionClass($this);
     if (array_key_exists('BishopB\\Forum\\AuditingTrait', $reflection->getTraits())) {
         $this->guarded = $this->guarded + $this->getAuditors();
     }
     parent::__construct($attributes);
 }
开发者ID:bishopb,项目名称:laravel-forums,代码行数:16,代码来源:BaseModel.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $config = Config::get('app.txtMsg');
     $this->sendUrl = $config['url'];
     $this->apiKey = $config['key'];
     $this->apiPass = $config['pass'];
     $this->apiId = $config['id'];
 }
开发者ID:qnck,项目名称:qingnianchuangke,代码行数:9,代码来源:TxtMessage.php

示例12: __construct

 /**
  * AbstractTranslatableModel constructor.
  * @param array $attributes
  */
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
     if (empty($this->translationModel) || empty($this->translationForeignKey) || empty($this->translatedAttributes)) {
         throw new \Exception('This model requires these attributes must be set to work normally :
         "translationModel", "translationForeignKey", "translatedAttributes"');
         //see comments below for sample
     }
     $this->initListify();
 }
开发者ID:trungtnm,项目名称:backend,代码行数:14,代码来源:AbstractTranslatableModel.php

示例13: __construct

 public function __construct()
 {
     $this->title = '';
     $this->description = '';
     $this->has_dimension = false;
     $this->has_budget = false;
     $this->dimension = '';
     $this->budget = '';
     $this->type = 'draft';
     parent::__construct();
 }
开发者ID:jaymondigo,项目名称:custommade,代码行数:11,代码来源:Project.php

示例14: __construct

 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     // Create class methods on the fly.
     foreach (static::$states as $state) {
         $method = camel_case("is {$state}");
         $this->addMethod($method, function () use($state) {
             return $this->state == $state;
         });
     }
 }
开发者ID:sagaciresearch,项目名称:adtracking,代码行数:11,代码来源:Tracking.php

示例15: __construct

 public function __construct(array $attributes = [], $options = [])
 {
     foreach ($options as $key => $value) {
         if ($value) {
             $propertyName = 'fake' . studly_case($key);
             self::${$propertyName} = $value;
         }
     }
     $this->table = self::$fakeTable;
     $this->connection = self::$fakeConnection;
     $this->primaryKey = self::$fakePrimaryKey;
     parent::__construct($attributes);
 }
开发者ID:marcmascarell,项目名称:laravel-artificer,代码行数:13,代码来源:FakeModel.php


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