Closed azizcelikeri closed 7 years ago
You can use: $this->edit->add('type', 'User Type', 'select')->option("A", "A",)->option("B", B");
But Im not sure why you're using insertValue(), this will insert 1 in your db directly.
Check this -> https://github.com/zofe/rapyd-laravel/wiki/Default-values
Thats my bad. Thank you very much :)
Hi,
I am trying to add my users model to panel. There is a user type field and it can be "A" or "B" and I want to use select box in CURD fields.
$this->edit->add('type', 'User Type', 'select')->insertValue(1)->options(["A" => "A", "B" => "B"]);
When I use code above the selected field is not getting from the database and it is A on page load. What is the problem?