name = $request->get('name'); $this->description = $request->get('description'); $this->generateAlias(); return $this; } public function generateAlias() { $this->url_alias = ucfirst(preg_replace('/[^a-z0-9\-]/', '-', strtolower($this->name))); } public function getUploadDisk() { // TODO allow albums to specify a storage location return 'local'; } }