/** * Creates a class name from table name * * @param string $name * @return string */ public function getClassName($name) { return source_form_name($name); }
/** * @param Request $request * @param NodeSource $source */ protected function validateEditForm(Request $request, NodeSource $source) { $this->validateForm(source_form_name($source->source_type, true), $request, ['node_name' => 'max:255|alpha_dash|unique:node_sources,node_name,' . $source->getKey()]); }
/** @test */ function it_registers_source_form_name_helper() { $this->assertEquals('EditProjectForm', source_form_name('project')); $this->assertEquals('gen\\Forms\\EditProjectForm', source_form_name('project', true)); }