public function __construct(array $attributes = []) { $place = last(explode('/', request()->server()['REQUEST_URI'])); #request()->route('place'); $this->hasAttachedFile('image_desktop', ['styles' => ['crop' => function ($file, $imagine) { $image = $imagine->open($file->getRealPath()); if (request()->input('crop.image_desktop.w') >= 0 && request()->input('crop.image_desktop.y') >= 0) { $image->crop(new \Imagine\Image\Point(request()->input('crop.image_desktop.x'), request()->input('crop.image_desktop.y')), new \Imagine\Image\Box(request()->input('crop.image_desktop.w'), request()->input('crop.image_desktop.h'))); } return $image; }], 'default_url' => 'http://placehold.it/' . config('mbanners.places.' . $place . '.desktop.width') . 'x' . config('mbanners.places.' . $place . '.desktop.height')]); if (config('mbanners.places.' . $place . '.tablet') !== false) { $this->hasAttachedFile('image_tablet', ['styles' => ['crop' => function ($file, $imagine) { $image = $imagine->open($file->getRealPath()); if (request()->input('crop.image_tablet.w') >= 0 && request()->input('crop.image_tablet.y') >= 0) { $image->crop(new \Imagine\Image\Point(request()->input('crop.image_tablet.x'), request()->input('crop.image_tablet.y')), new \Imagine\Image\Box(request()->input('crop.image_tablet.w'), request()->input('crop.image_tablet.h'))); } return $image; }], 'default_url' => 'http://placehold.it/' . config('mbanners.places.' . $place . '.tablet.width') . 'x' . config('mbanners.places.' . $place . '.tablet.height')]); } if (config('mbanners.places.' . $place . '.mobile') !== false) { $this->hasAttachedFile('image_mobile', ['styles' => ['crop' => function ($file, $imagine) { $image = $imagine->open($file->getRealPath()); if (request()->input('crop.image_mobile.w') >= 0 && request()->input('crop.image_mobile.y') >= 0) { $image->crop(new \Imagine\Image\Point(request()->input('crop.image_mobile.x'), request()->input('crop.image_mobile.y')), new \Imagine\Image\Box(request()->input('crop.image_mobile.w'), request()->input('crop.image_mobile.h'))); } return $image; }], 'default_url' => 'http://placehold.it/' . config('mbanners.places.' . $place . '.mobile.width') . 'x' . config('mbanners.places.' . $place . '.mobile.height')]); } parent::__construct($attributes); }
public function __construct(array $attributes = array()) { parent::__construct($attributes); if ($connection = config('tagging.connection')) { $this->connection = $connection; } }
/** * {@inheritDoc} */ public function __construct(array $attributes = []) { $this->table = config('vi-kon.auth.table.user_permissions'); $this->timestamps = false; $this->casts = [static::FIELD_TOKEN => 'string']; parent::__construct($attributes); }
public function __construct($attributes = array()) { //Eloquent model base construction parent::__construct($attributes); //App\Article //$this->user_id = 1; //TEMPORARY TEST }
public function __construct($attributes = []) { parent::__construct($attributes); if ($this->useSti()) { $this->setAttribute($this->stiClassField, get_class($this)); } }
public function __construct($tablename, $data) { parent::__construct($data); if ($tablename) { $this->setTable($tablename); } }
/** * constructor */ public function __construct(array $attributes = array()) { $this->timestamps = true; // call superclass constructor // Model::__construct($attributes); }
/** * Create a new Eloquent model instance. * * @param array $attributes */ public function __construct(array $attributes = []) { parent::__construct($attributes); if ($connection = config('database.default')) { $this->setConnection($connection); } }
public function __construct($attributes = array()) { parent::__construct($attributes); // initialize empty messages object $this->errors = new \Illuminate\Support\MessageBag(); $this->modelName = get_class($this); }
public function __construct(array $attributes = []) { parent::__construct($attributes); $this->errors = new MessageBag(); $this->validator = \App::make('validator'); $this->manejaConcurrencia = true; }
/** * __construct. * * @method __construct * * @param array $attributes */ public function __construct(array $attributes = []) { if (empty($attributes['hash'])) { $attributes['hash'] = Random::generateToken(); } parent::__construct($attributes); }
/** * {@inheritDoc} */ public function __construct(array $attributes = []) { $this->table = config('vi-kon.auth.table.user_roles'); $this->timestamps = false; $this->casts = [static::FIELD_TOKEN => 'string', static::FIELD_STATIC => 'boolean', static::FIELD_HIDDEN => 'boolean']; parent::__construct($attributes); }
public function __construct(array $attributes = array()) { $this->hasAttachedFile('krapin'); $this->hasAttachedFile('titledeed'); $this->hasAttachedFile('passportphoto'); parent::__construct($attributes); }
/** * constructor */ public function __construct(array $attributes = array()) { $this->timestamps = false; // call superclass constructor // parent::__construct($attributes); }
/** * * @param type $module * @param type $entity * @param array $attributes */ public function __construct($module = null, $entity = null, array $attributes = []) { parent::__construct($attributes); if ($module && $entity) { $this->setScaffold($module, $entity); } }
public function __construct() { parent::__construct(); $this->table = "cliente"; $this->clienteId = "id"; $this->fields = explode(", ", "id, cpf, senha, nome, telefone, email, dt_nascimento"); }
/** * Create a new Eloquent model instance. * * @param array $attributes */ public function __construct(array $attributes = []) { parent::__construct($attributes); if ($connection = config('laravel-auth.database.connection')) { $this->setConnection($connection); } }
public function __construct(array $attributes = array()) { parent::__construct($attributes); if (!$this->acl_field_key && $this->getKeyName()) { $this->acl_field_key = $this->getKeyName(); } }
/** * 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('power::prefix', 'test'); $this->table = $this->prefix . $this->getTable(); }
/** * {@inheritdoc} */ public function __construct(array $attributes = []) { $defaults = []; static::$dispatcher->fire(new ConfigureModelDefaultAttributes($this, $defaults)); $this->attributes = $defaults; parent::__construct($attributes); }
/** * 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('admin.prefix', 'admin_'); $this->table = $this->prefix . $this->getTable(); }
function __construct() { if (!empty(Config::get('corcel.connection'))) { $this->connection = Config::get('corcel.connection'); } parent::__construct(); }
/** * Create a new model instance. * * @param array $attributes * @return void */ public function __construct(array $attributes = []) { parent::__construct($attributes); if ($connection = config('roles.connection')) { $this->connection = $connection; } }
/** * Create a new Eloquent model instance. * * @param array $attributes */ public function __construct($attributes = []) { if ($this->isPrefixed()) { $this->table = $this->prefix . $this->table; } parent::__construct($attributes); }
/** * Create a new CabinetUpload instance. */ public function __construct(array $attributes = array()) { parent::__construct($attributes); if (!static::$app) { static::$app = app(); } }
/** * Constructor * * @param array $attributes * * @return void */ public function __construct($attributes = array()) { parent::__construct($attributes); if ($this->sti_field) { $this->setAttribute($this->sti_field, get_class($this)); } }
public function __construct($attributes = array()) { parent::__construct($attributes); if ((new \ReflectionClass(get_class($this)))->isInstantiable()) { $this->setAttribute($this->getStiClassField(), get_class($this)); } }
/** * @param array $attributes */ public function __construct(array $attributes = array()) { parent::__construct($attributes); if ($this->isNeedMigrate()) { $this->autoMigrate(); } }
public function __construct(array $attributes = array()) { parent::__construct($attributes); // Set the prefix $tableName = \Config::get('kandy-laravel.kandy_live_chat_table'); $this->table = $this->prefix . $tableName; }
public function __construct(array $attributes = array()) { parent::__construct($attributes); if (!$this->root) { $this->root = $this->getRoot(); } }