当前位置: 首页>>代码示例>>PHP>>正文


PHP Option::create方法代码示例

本文整理汇总了PHP中Option::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Option::create方法的具体用法?PHP Option::create怎么用?PHP Option::create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Option的用法示例。


在下文中一共展示了Option::create方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 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']);
 }
开发者ID:Zipcore,项目名称:Sourcemod-Server-Manager-System,代码行数:7,代码来源:OptionsTableSeeder.php

示例2: _register

 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;
 }
开发者ID:amitchouhan004,项目名称:barchat,代码行数:9,代码来源:external.php

示例3: up

 /**
  * 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']);
 }
开发者ID:anthon-alindada,项目名称:gaming-88,代码行数:15,代码来源:2015_01_06_145652_create_options_table.php

示例4: _heavy

 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;
 }
开发者ID:amitchouhan004,项目名称:barchat,代码行数:8,代码来源:presence.php

示例5: foreach

    $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>
开发者ID:aarsee,项目名称:Drexel-Project,代码行数:31,代码来源:create-survey.php


注:本文中的Option::create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。