/** * Handle the creation of the Field in the Database * @param $command * @return static */ public function handle($command) { $command->namespace = EntityModel::find($command->entity_id)->namespace; $field = FieldModel::create((array) $command); event(new FieldWasCreated($field)); return $field; }