Example #1
0
 public function __construct(Website $website)
 {
     $this->website = $website;
     if ($this->website->isDirty('identifier')) {
         $this->old_path = sprintf('%s/%d-%s/', Config::get('multi-tenant.tenant-directory') ? Config::get('multi-tenant.tenant-directory') : storage_path('multi-tenant'), $this->website->id, $this->website->getOriginal('identifier'));
         if (!File::isDirectory($this->old_path)) {
             $this->old_path = null;
         }
     }
     $this->base_path = sprintf('%s/%d-%s/', Config::get('multi-tenant.tenant-directory') ? Config::get('multi-tenant.tenant-directory') : storage_path('multi-tenant'), $this->website->id, $this->website->identifier);
 }