src/Commands/stubs/form.stub
<?php
namespace DummyNamespace;
use Grafite\Forms\Forms\ModelForm;
class DummyClass extends ModelForm
{
/**
* The model for the form
*
* @var \Illuminate\Database\Eloquent\Model
*/
public $model = DummyModel::class;
/**
* Required prefix of routes
*
* Can be `user` for all `user.`
* name routes.
*
* @var string
*/
public $routePrefix = 'DummyPrefix';
/**
* Buttons and values
*
* You can add a `cancel => Cancel`
* which will create a cancel button.
* Then you can set it's route with the
* `buttonLinks` property.
*
* @var array
*/
public $buttons = [
'submit' => 'Save'
];
/**
* Set the desired fields for the form
*
* @return array
*/
public function fields()
{
return [
//
];
}
}