public function run() { Option::create(['name' => 'default_language', 'friendly_name' => 'Default Language', 'value' => 'en', 'options' => "en|nl|de", 'description' => 'If no language is set by the user, this is the default']); Option::create(['name' => 'application_title', 'friendly_name' => 'Application Title', 'value' => 'SSMS', 'description' => 'The title used in various places around the application']); Option::create(['name' => 'theme', 'friendly_name' => 'Theme', 'value' => 'blue', 'options' => "blue|red|green", 'description' => 'The colour theme the application']); Option::create(['name' => 'companion_script', 'friendly_name' => 'SSMS Companion Shell Script', 'value' => 'true', 'options' => "true|false", 'description' => 'Whether or not you are using the SSMS shell script to control your servers']); }
function _register($params) { $name = $params['name']; $url = $params['url']; $user = $params['user']; Option::create()->grouping('external')->name($name)->value($url)->insert(); Status::create()->data('External created.')->type('system')->user_id($user->id)->user_to($user->id)->cssclass('ok')->insert(); return true; }
/** * Run the migrations. * * @return void */ public function up() { Schema::create('options', function (Blueprint $table) { $table->increments('id'); $table->string('key')->unique(); $table->string('value'); $table->timestamps(); }); Option::create(['key' => 'exp', 'value' => '2015-01-09']); }
function _heavy($params) { $user = $params['user']; DB::get()->query("DELETE FROM options where user_id = ? and grouping = 'Identity' and name = 'heavy'", array($user->id)); Option::create()->grouping('Identity')->name('heavy')->value('true')->user_id($user->id)->insert(); Status::create()->data('You are now heavy.')->cssclass('ok')->user_id($user->id)->type('direct')->user_to($user->id)->insert(); return true; }
$sql = "SELECT * FROM questions ORDER BY question_id desc limit 1"; $result_set = $database->execute_query($sql); $row = $database->fetch_array($result_set); $question_id = array_shift($row); //set default value 'false' to $if_created... //Used to display success of error message to user... $if_created = 'false'; $options = $_POST['option_content']; $option_id = 1; foreach ($options as $option) { $new_option = new Option(); $new_option->option_id = $option_id; $new_option->option_content = $option; $new_option->question_id = $question_id; //If everything goes right, 'if_created' should be 'true'... $if_creted = $new_option->create(); $option_id++; } } ?> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="description" content="Neon Admin Panel" /> <meta name="author" content="" /> <title>LLSCT | Create Survey</title>