Example #1
0
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
     $this->websiteId = Session::get('website_id');
     $this->defaultWebsiteId = Session::get('default_website_id');
     $this->isDefaultWebsite = Session::get('is_default_website');
 }
Example #2
0
 /**
  * Initialiaze page modal.
  *
  * @param $name
  */
 public function __construct()
 {
     parent::__construct();
     $config = config($this->config);
     foreach ($config as $key => $val) {
         if (property_exists(get_called_class(), $key)) {
             $this->{$key} = $val;
         }
     }
 }
Example #3
0
 public function __construct(array $attributes = [])
 {
     $this->hasAttachedFile('image', ['styles' => ['crop' => function ($file, $imagine) {
         $image = $imagine->open($file->getRealPath());
         if (request()->input('crop.image.w') >= 0 && request()->input('crop.image.y') >= 0) {
             $image->crop(new \Imagine\Image\Point(request()->input('crop.image.x'), request()->input('crop.image.y')), new \Imagine\Image\Box(request()->input('crop.image.w'), request()->input('crop.image.h')));
         }
         return $image;
     }], 'default_url' => '']);
     parent::__construct($attributes);
 }
Example #4
0
 /**
  * @param array $attributes
  */
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
     $this->table = config('access.users_table');
 }
Example #5
0
 public function __construct(array $attributes = array())
 {
     $this->hasAttachedFile('photo', ['styles' => ['large' => '600x600', 'medium' => '300x300', 'thumb' => '100x100!'], 'default_url' => '/template/images/student.png']);
     parent::__construct($attributes);
 }