I've been trying to create a dropdown for our module based on data from the database. I want to get the admin names, and these should be selectable in the dropdown menu.
function mymodule_config(){
$admins =Capsule::table('tbladmins')->get();foreach($admins as $adminNames){
$admin = $adminNames->username;return[// Display name for your module'name'=>'Test',// Description displayed within the admin interface'description'=>'Test',// Module author name'author'=>'Test',// Default language'language'=>'english',// Version number'version'=>'0.1','fields'=>[// the dropdown field type renders a select menu of options'AdminSend'=>['FriendlyName'=>'Admin to create ticket','Type'=>'dropdown','Options'=> $admin,'Description'=>'Choose one',],]];}}
Above is what I've tried, and it didn't think it would work - and it didn't. What is the proper way to do this?
Question
DennisHermannsen
Hi,
I've been trying to create a dropdown for our module based on data from the database. I want to get the admin names, and these should be selectable in the dropdown menu.
Above is what I've tried, and it didn't think it would work - and it didn't. What is the proper way to do this?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.