You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
855 B
47 lines
855 B
<?php
|
|
|
|
namespace App\Admin\Forms;
|
|
|
|
use Dcat\Admin\Widgets\Form;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
class SelectHorseman extends Form
|
|
{
|
|
/**
|
|
* Handle the form request.
|
|
*
|
|
* @param array $input
|
|
*
|
|
* @return Response
|
|
*/
|
|
public function handle(array $input)
|
|
{
|
|
// dump($input);
|
|
|
|
// return $this->error('Your error message.');
|
|
|
|
return $this->success('Processed successfully.', '/');
|
|
}
|
|
|
|
/**
|
|
* Build a form here.
|
|
*/
|
|
public function form()
|
|
{
|
|
$this->text('name')->required();
|
|
$this->email('email')->rules('email');
|
|
}
|
|
|
|
/**
|
|
* The data of the form.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function default()
|
|
{
|
|
return [
|
|
'name' => 'John Doe',
|
|
'email' => 'John.Doe@gmail.com',
|
|
];
|
|
}
|
|
}
|