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


PHP DB::unprepared方法代码示例

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


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

示例1: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     \DB::unprepared('DROP TRIGGER after_group_insert_update_user_role');
     \DB::unprepared('DROP TRIGGER after_group_delete_update_user_role');
     \DB::unprepared('DROP TRIGGER after_users_create_user_settings');
     \DB::unprepared('DROP TRIGGER after_permissions_create_admin_guard_permission');
 }
开发者ID:linguisticteam,项目名称:laravel-boilerplate,代码行数:12,代码来源:2016_01_01_100001_create_triggers.php

示例2: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Section::create(['title' => 'all', 'data' => '', 'markdown' => '']);
     $statement = "UPDATE  `sections` SET  `id` =  '0' WHERE  `sections`.`id` =1;";
     DB::unprepared($statement);
     Section::create(['title' => 'news', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'science', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'tech', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'politics', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'frogs', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'econ', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'math', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'prog', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
     Section::create(['title' => 'worms2', 'data' => '', 'markdown' => '']);
 }
开发者ID:hrenos,项目名称:spreadit,代码行数:32,代码来源:SectionTableSeeder.php

示例3: up

 public function up()
 {
     DB::unprepared("ALTER TABLE `royalty_stream_file` DROP `created`, DROP `updated`;");
     DB::unprepared("ALTER TABLE `royalty_stream_file` CHANGE `created_at` `created` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',\nCHANGE `updated_at` `updated` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00';");
     DB::unprepared("ALTER TABLE `royalty_stream_file` CHANGE `deleted` `deleted` TINYINT( 1 ) NOT NULL;");
     DB::unprepared("UPDATE `royalty_stream_file` SET `deleted` =1 WHERE `deleted_at` IS NOT NULL;");
 }
开发者ID:alternativex,项目名称:Backend-app,代码行数:7,代码来源:2015_03_09_100517_alter_royalty_stream_file.php

示例4: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table("states")->delete();
     $resetPrimaryKeyStatement = "ALTER TABLE states AUTO_INCREMENT = 1;";
     DB::unprepared($resetPrimaryKeyStatement);
     DB::table("states")->insert([["abbreviation" => "AL", "name" => "Alabama"], ["abbreviation" => "AK", "name" => "Alaska"], ["abbreviation" => "AZ", "name" => "Arizona"], ["abbreviation" => "AR", "name" => "Arkansas"], ["abbreviation" => "CA", "name" => "California"], ["abbreviation" => "CO", "name" => "Colorado"], ["abbreviation" => "CT", "name" => "Connecticut"], ["abbreviation" => "DE", "name" => "Delaware"], ["abbreviation" => "DC", "name" => "District Of Columbia"], ["abbreviation" => "FL", "name" => "Florida"], ["abbreviation" => "GA", "name" => "Georgia"], ["abbreviation" => "HI", "name" => "Hawaii"], ["abbreviation" => "ID", "name" => "Idaho"], ["abbreviation" => "IL", "name" => "Illinois"], ["abbreviation" => "IN", "name" => "Indiana"], ["abbreviation" => "IA", "name" => "Iowa"], ["abbreviation" => "KS", "name" => "Kansas"], ["abbreviation" => "KY", "name" => "Kentucky"], ["abbreviation" => "LA", "name" => "Louisiana"], ["abbreviation" => "ME", "name" => "Maine"], ["abbreviation" => "MD", "name" => "Maryland"], ["abbreviation" => "MA", "name" => "Massachusetts"], ["abbreviation" => "MI", "name" => "Michigan"], ["abbreviation" => "MN", "name" => "Minnesota"], ["abbreviation" => "MS", "name" => "Mississippi"], ["abbreviation" => "MO", "name" => "Missouri"], ["abbreviation" => "MT", "name" => "Montana"], ["abbreviation" => "NE", "name" => "Nebraska"], ["abbreviation" => "NV", "name" => "Nevada"], ["abbreviation" => "NH", "name" => "New Hampshire"], ["abbreviation" => "NJ", "name" => "New Jersey"], ["abbreviation" => "NM", "name" => "New Mexico"], ["abbreviation" => "NY", "name" => "New York"], ["abbreviation" => "NC", "name" => "North Carolina"], ["abbreviation" => "ND", "name" => "North Dakota"], ["abbreviation" => "OH", "name" => "Ohio"], ["abbreviation" => "OK", "name" => "Oklahoma"], ["abbreviation" => "OR", "name" => "Oregon"], ["abbreviation" => "PA", "name" => "Pennsylvania"], ["abbreviation" => "RI", "name" => "Rhode Island"], ["abbreviation" => "SC", "name" => "South Carolina"], ["abbreviation" => "SD", "name" => "South Dakota"], ["abbreviation" => "TN", "name" => "Tennessee"], ["abbreviation" => "TX", "name" => "Texas"], ["abbreviation" => "UT", "name" => "Utah"], ["abbreviation" => "VT", "name" => "Vermont"], ["abbreviation" => "VA", "name" => "Virginia"], ["abbreviation" => "WA", "name" => "Washington"], ["abbreviation" => "WV", "name" => "West Virginia"], ["abbreviation" => "WI", "name" => "Wisconsin"], ["abbreviation" => "WY", "name" => "Wyoming"]]);
 }
开发者ID:JonPecoraro,项目名称:murraywhiteinsurance,代码行数:12,代码来源:states_table_seeder.php

示例5: up

 public function up()
 {
     DB::unprepared("UPDATE `royalty_type` SET `royalty_type_name` = `name` ;");
     DB::unprepared("ALTER TABLE `royalty_type` CHANGE `created_at` `created` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00';");
     DB::unprepared("ALTER TABLE `royalty_type` CHANGE `updated_at` `updated` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
     DB::unprepared("ALTER TABLE `royalty_type` ADD `deleted` TINYINT( 1 ) NOT NULL ");
 }
开发者ID:alternativex,项目名称:Backend-app,代码行数:7,代码来源:2015_03_09_095451_alter_royalty_type.php

示例6: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table("team_members")->delete();
     $resetPrimaryKeyStatement = "ALTER TABLE team_members AUTO_INCREMENT = 1;";
     DB::unprepared($resetPrimaryKeyStatement);
     DB::table("team_members")->insert([["first_name" => "Murray", "last_name" => "White", "suffix" => "Jr.", "email" => "murraywhite@murraymwhiteinc.com", "extension" => "641", "position" => "President", "qualifications" => null, "description" => "Murray Junior is an active agent with Murray White Insurance. He joined the family business in 1950 and has played a vital roll in growing the Agency into what it is today. Murray is a native of High Point, NC, a graduate of High Point University, and a true believer in all that High Point has to offer. Murray has been married for nearly 60 years, and enjoys spending time with his cat, watching his grandchildren flourish in their careers, and relaxing with some TV.", "image" => "/img/team/murray_white_jr.jpg", "employment_date" => "White"], ["first_name" => "Murray", "last_name" => "White", "suffix" => "III", "email" => "m3@murraymwhiteinc.com", "extension" => "646", "position" => "Vice President", "qualifications" => null, "description" => "Murray 3, as he is known around the office, joined the family business in 1981. He has taken the lead in recent years to continue to build the Agency on the foundation that was created by his family. Murray 3 is an active agent, who assists clients in all areas of Insurance. When he is not in the office you can find him supporting High Point University Athletics or coaching a local little league baseball team. Murray 3 is happily married and excited to have his son working beside him in the family business.", "image" => "/img/team/murray_white_3.jpg", "employment_date" => "White"], ["first_name" => "Rick", "last_name" => "Powers", "suffix" => null, "email" => "rick@murraymwhiteinc.com", "extension" => "643", "position" => "Vice President", "qualifications" => null, "description" => "Rick is an experienced Agent with Murray White Insurance. He’s been selling policies to customers for over 23 years. While Rick is well versed in the industry, he specializes in Health Insurance. When he’s not assisting clients with their health needs, he can be found cheering on many North Carolina spots teams, as he’s a die hard Carolina Panthers, Charlotte Hornets, and UNC Chapel Hill fan. Rick is married with two kids and lives in the Triad.", "image" => "/img/team/rick_powers.jpg", "employment_date" => "Powers"], ["first_name" => "Murray", "last_name" => "White", "suffix" => "IV", "email" => "m4@murraymwhiteinc.com", "extension" => "638", "position" => "Account Executive", "qualifications" => null, "description" => "Murray 4, brings some new life to Murray White Insurance. He joined the family business in December of 2013 and is continuing to learn and grow each day. Murray 4 energetically jumped on board with the Property and Casualty side of Insurance and hopes to be able to assist clients in all areas of Insurance soon. Prior to Insurance, Murray worked for the Greensboro Grasshoppers as a Sales Associate right out of college. Murray grew up playing ball at Ledford High School and went on to play baseball at High Point University. In his spare time, he loves to travel with his wife and watch Carolina Sports teams.", "image" => "/img/team/murray_white_4.jpg", "employment_date" => "White"], ["first_name" => "Amy", "last_name" => "Jarozewski", "suffix" => null, "email" => "amy@murraymwhiteinc.com", "extension" => "639", "position" => "Personal Lines Customer Service Representative", "qualifications" => "CISR", "description" => "Amy was recently welcomed back to Murray White Insurance, and has worked for the company for over three years. Amy specifically assists customers with all questions, concerns, and issues regarding personal lines. Originally from Cincinnati, OH, Amy has lived in the Triad since the early 90s. Outside the office, Amy loves spending time with her 2 grandchildren, both her son and stepson, and her husband.", "image" => "/img/team/amy_jarozewski.jpg", "employment_date" => "Jarozewski"], ["first_name" => "Kim", "last_name" => "Milan", "suffix" => null, "email" => "kim@murraymwhiteinc.com", "extension" => "644", "position" => "Accounting / Office Manager", "qualifications" => null, "description" => "Kim is one of the longest running associates at Murray White Insurance Agency. She’s been assisting the office in all accounting activities and Office Manager duties for over 30 years. Kim knows the business inside and out, and can be counted on by her coworkers for anything. Being a native of the Triad, Kim grew up in Trinity and then moved to Lexington with her husband to start her family. She has two wonderful grown children, and loves to read, crochet, and do crafts in her spare time. In addition, Kim is an animal lover, especially her Lab Noodles!", "image" => "/img/team/kim_milan.jpg", "employment_date" => "Milan"], ["first_name" => "Cindi", "last_name" => "Michael", "suffix" => null, "email" => "cindi@murraymwhiteinc.com", "extension" => "634", "position" => "Commercial Lines Customer Service Representative", "qualifications" => "CIC, CPIW", "description" => "Cindi is a tenured associate at Murray White Insurance Agency. She has been assisting clients for the past 21 years. Cindi is a native to the Triad, having spent her whole life in Lexington. In her free time, she enjoys spending time with her family, especially her granddaughter.", "image" => "/img/team/cindi_michael.jpg", "employment_date" => "Michael"], ["first_name" => "Sharon", "last_name" => "Idol", "suffix" => null, "email" => "sharon@murraymwhiteinc.com", "extension" => "636", "position" => "Commercial Lines Customer Service Representative", "qualifications" => "CISR", "description" => "Sharon is a welcomed new addition to Murray White Insurance! She’s been with the Agency for a year, but comes with 32+ years of insurance experience! Sharon is familiar with the area, having grown up in Forsyth County; she now resides in Davie County with her loving husband. In her free time, you can find Sharon camping, cooking, gardening, or decorating. She has one son who is currently in college studying Fire Protection and Technology.", "image" => "/img/team/sharon_idol.jpg", "employment_date" => "Idol"], ["first_name" => "Phillis", "last_name" => "Butcher", "suffix" => null, "email" => "phillis@murraymwhiteinc.com", "extension" => "642", "position" => "Commercial Lines Customer Service Representative", "qualifications" => "CPIA", "description" => "Phillis has been a familiar face with Murray White Insurance for 20+ years. She is originally from Georgia, but has spent the last 25 years making North Carolina home. In her spare time, you can find Phillis enjoying family time at the beach or cheering on the local baseball and softball teams. She has 2 wonderful children and 4 grandchildren that bring her and her husband great joy.", "image" => "/img/team/phillis_butcher.jpg", "employment_date" => "Butcher"], ["first_name" => "Angie", "last_name" => "McClure", "suffix" => null, "email" => "angie@murraymwhiteinc.com", "extension" => "630", "position" => "Life & Health Benefit Analyst", "qualifications" => "RHU, CIIP", "description" => "Angie has been with Murray White Insurance for more than 14 years and brings over 30 years of experience in group health, life, disability, and dental insurance. At Murray White Insurance she specializes in Benefits. She’s an active member of the International Association of Insurance Professionals, and previously served as NC Association of Insurance Professionals State President. Outside of the Agency, Angie enjoys line dancing, crafts, traveling, and spending time with friends and family, especially her 4 children and 4 grand-children.", "image" => "/img/team/angie_mcClure.jpg", "employment_date" => "McClure"], ["first_name" => "Frances", "last_name" => "Pope", "suffix" => null, "email" => "murraywhite@murraymwhiteinc.com", "extension" => "747", "position" => "Receptionist / Licensing", "qualifications" => null, "description" => "Frances has been with Murray White Insurance for 5+ years and has 35+ years of experience in the Insurance Industry. Frances was originally from Tennessee, but has spent the majority of her like in the Piedmont area. Her and her husband love the mountains and spending quality time with their 2 children, 8 grand-children, and 2 great grand-children!", "image" => "/img/team/frances_pope.jpg", "employment_date" => "Pope"], ["first_name" => "Fran", "last_name" => "Brown", "suffix" => null, "email" => "fran@murraymwhiteinc.com", "extension" => "637", "position" => "Vice President", "qualifications" => "CISR", "description" => "Commercial Lines Customer Service Representative", "image" => "/img/team/fran_brown.jpg", "employment_date" => "Brown"], ["first_name" => "Betty", "last_name" => "Callicut", "suffix" => null, "email" => "bett@murraymwhiteinc.com", "extension" => "631", "position" => "Commercial Lines Customer Service Representative", "qualifications" => "CIC, CPIW", "description" => "Betty has been with Murray White Insurance for 21+ years, assisting her clients with all their commercial lines questions and concerns. She is a native of Thomasville and loves spending time with her husband, 2 boys, and their adorable dog. In her free time you can find Betty reading, line dancing, or scrap-booking!", "image" => "/img/team/betty_callicut.jpg", "employment_date" => "Callicut"], ["first_name" => "Suzanne", "last_name" => "Hedgecock", "suffix" => null, "email" => "suzanne@murraymwhiteinc.com", "extension" => null, "position" => "Personal Lines Customer Service Representative", "qualifications" => null, "description" => "Suzanne is a new employee at Murray White Insurance. We gladly welcome her to the company!", "image" => null, "employment_date" => "Hedgecock"], ["first_name" => "Ricky", "last_name" => "DeLappe", "suffix" => null, "email" => "ricky@murraymwhiteinc.com", "extension" => null, "position" => "Account Executive", "qualifications" => null, "description" => "Ricky is a new employee at Murray White Insurance. We gladly welcome him to the company!", "image" => null, "employment_date" => "DeLappe"], ["first_name" => "Emily", "last_name" => "Smith", "suffix" => null, "email" => "emily@murraymwhiteinc.com", "extension" => null, "position" => "Personal Lines Customer Service Representative", "qualifications" => null, "description" => "Emily is a new employee at Murray White Insurance. We gladly welcome her to the company!", "image" => null, "employment_date" => "Smith"]]);
 }
开发者ID:JonPecoraro,项目名称:murraywhiteinsurance,代码行数:12,代码来源:team_members_table_seeder.php

示例7: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table("represented_companies")->delete();
     $resetPrimaryKeyStatement = "ALTER TABLE represented_companies AUTO_INCREMENT = 1;";
     DB::unprepared($resetPrimaryKeyStatement);
     DB::table("represented_companies")->insert([["name" => "Aetna", "phone" => "800-872-3862", "url" => "https://www.aetna.com", "image" => "/img/logos/aetna.jpg"], ["name" => "AlwaysCare Benefits", "phone" => "888-729-5433", "url" => "http://www.alwayscarebenefits.com", "image" => "/img/logos/alwaysCareBenefits.jpg"], ["name" => "American Strategic Insurance", "phone" => "866-274-8765", "url" => "http://www.americanstrategic.com", "image" => "/img/logos/americanStrategicInsurance.jpg"], ["name" => "Blue Cross Blue Shield", "phone" => "800-446-8053", "url" => "http://www.bcbsnc.com", "image" => "/img/logos/blueCrossBlueShield.jpg"], ["name" => "Builders Mutual", "phone" => "800-809-4859", "url" => "https://www.buildersmutual.com", "image" => "/img/logos/buildersMutual.jpg"], ["name" => "Community Eye Care", "phone" => "888-254-4290", "url" => "http://www.communityeyecare.net", "image" => "/img/logos/communityEyeCare.jpg"], ["name" => "Companion Life", "phone" => "800-753-0404", "url" => "http://www.companionlife.com", "image" => "/img/logos/companionLife.jpg"], ["name" => "Foremost Insurance Group", "phone" => "800-527-3907", "url" => "http://www.foremost.com", "image" => "/img/logos/foremostInsuranceGroup.jpg"], ["name" => "Guardian Life Insurance", "phone" => "888-482-7342", "url" => "https://www.guardianlife.com", "image" => "/img/logos/guardian.jpg"], ["name" => "Isurity", "phone" => "336-869-3000", "url" => "http://www.isurity.com", "image" => "/img/logos/isurity.jpg"], ["name" => "Jackson Sumner", "phone" => "800-342-5572", "url" => "https://www.jsausa.com", "image" => "/img/logos/jacksonSumner.jpg"], ["name" => "Jefferson Pilot / Lincoln Financial", "phone" => "800-487-1485", "url" => "https://www.lfg.com/public/individual", "image" => "/img/logos/jeffersonPilotFinancial.jpg"], ["name" => "Kansas City Life", "phone" => "800-821-6164", "url" => "https://www.kclife.com", "image" => "/img/logos/kansasCityLife.jpg"], ["name" => "Kemper Insurance Group", "phone" => "866-860-9348", "url" => "https://www.kemper.com", "image" => "/img/logos/kemperInsuranceGroup.jpg"], ["name" => "Liberty Mutual", "phone" => "888-398-8924", "url" => "https://www.libertymutual.com", "image" => "/img/logos/libertyMutual.jpg"], ["name" => "Main Street America Group", "phone" => "800-226-0875", "url" => "http://www.msagroup.com", "image" => "/img/logos/mainStreetAmericaGroup.jpg"], ["name" => "MetLife", "phone" => "800-438-6388", "url" => "https://www.metlife.com", "image" => "/img/logos/metlife.jpg"], ["name" => "Mutual of Omaha", "phone" => "800-769-7159", "url" => "http://www.mutualofomaha.com", "image" => "/img/logos/mutualOfOmaha.jpg"], ["name" => "National Flood Insurance Program", "phone" => "800-638-6620", "url" => "https://www.fema.gov/national-flood-insurance-program", "image" => "/img/logos/nationalFloodInsuranceProgram.jpg"], ["name" => "National General Insurance Company", "phone" => "800-462-2123", "url" => "http://www.nationalgeneral.com", "image" => "/img/logos/nationalGeneralInsuranceCompany.jpg"], ["name" => "Nationwide", "phone" => "877-669-6877", "url" => "http://www.nationwide.com", "image" => "/img/logos/nationwide.jpg"], ["name" => "Pennsylvania Lumbermens", "phone" => "800-752-1895", "url" => "http://www.plmilm.com", "image" => "/img/logos/pennsylvaniaLumbermens.jpg"], ["name" => "Progressive", "phone" => "800-776-4737", "url" => "http://www.progressive.com", "image" => "/img/logos/progressive.jpg"], ["name" => "SafeCo", "phone" => "800-332-3226", "url" => "http://www.safeco.com", "image" => "/img/logos/safeCo.jpg"], ["name" => "State Auto", "phone" => "614-464-5000", "url" => "https://www.stateauto.com", "image" => "/img/logos/stateAuto.jpg"], ["name" => "Tapco", "phone" => "800-334-5579", "url" => "http://www.gotapco.com", "image" => "/img/logos/tapco.jpg"], ["name" => "United Healthcare", "phone" => "866-633-2446", "url" => "http://www.uhc.com", "image" => "/img/logos/unitedHealthCare.jpg"], ["name" => "Utica National", "phone" => "804-560-6600", "url" => "http://www.uticanational.com/Insurance", "image" => "/img/logos/uticaNational.jpg"], ["name" => "United States Liability Insurance Group", "phone" => "800-523-5545", "url" => "http://www.usli.com", "image" => "/img/logos/unitedStatesLiabilityInsuranceGroup.jpg"]]);
 }
开发者ID:JonPecoraro,项目名称:murraywhiteinsurance,代码行数:12,代码来源:represented_companies_table_seeder.php

示例8: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     // Creates the users table
     Schema::create('acl_users', function ($table) {
         $table->increments('id');
         $table->string('username')->unique();
         $table->string('fullname')->nullable();
         $table->string('email')->nullable();
         $table->string('company_name')->nullable();
         $table->string('ip_address', 39);
         $table->text('return_url')->nullable();
         $table->dateTime('last_login');
         $table->string('last_login_ip');
         $table->string('password');
         $table->text('passwords')->nullable();
         $table->string('confirmation_code');
         $table->boolean('confirmed')->default(false);
         $table->boolean('rfid_login')->default(false);
         $table->string('rfid_serial')->nullable();
         $table->tinyInteger('status')->default('1');
         $table->string('session_token')->nullable();
         $table->string('remember_token')->nullable();
         $table->dateTime('last_password_change')->nullable();
         $table->dateTime('password_expiration_date')->nullable();
         $table->dateTime('account_expiration_date')->nullable();
         $table->timestamps();
     });
     $statement = "ALTER TABLE acl_users AUTO_INCREMENT = 0;";
     DB::unprepared($statement);
 }
开发者ID:pacificcasinohotel,项目名称:pointsystem,代码行数:35,代码来源:2014_06_30_054035_create_acl_users_table.php

示例9: run

    public function run()
    {
        // Refresh user groups
        $sql = <<<'EOL'
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE menus;
SET FOREIGN_KEY_CHECKS=1;
EOL;
        DB::unprepared($sql);
        // Assign administrator user to admin group
        try {
            $menu_icon_user = DB::table('menu_icons')->where('title', '=', 'icon-user')->first();
            $menu_icon_cog = DB::table('menu_icons')->where('title', '=', 'icon-cog')->first();
            $location = DB::table('menu_locations')->where('slug', '=', 'header')->first();
            if (!empty($location)) {
                //User!
                Menu::getMenuProvider()->getMenuModelProvider()->create(array('title' => 'User', 'location_id' => $location->id, 'priority' => 0, 'icon_id' => empty($menu_icon_user->id) ? null : $menu_icon_user->id));
                //Guest!
                Menu::getMenuProvider()->getMenuModelProvider()->create(array('title' => 'Guest', 'location_id' => $location->id, 'priority' => 1, 'icon_id' => empty($menu_icon_user->id) ? null : $menu_icon_user->id));
            }
            $location = DB::table('menu_locations')->where('slug', '=', 'left-sidebar')->first();
            if (!empty($location)) {
                Menu::getMenuProvider()->getMenuModelProvider()->create(array('title' => 'Configuration', 'location_id' => $location->id, 'priority' => -10, 'icon_id' => empty($menu_icon_cog->id) ? null : $menu_icon_cog->id));
            }
        } catch (Exception $e) {
            var_dump($e);
        }
    }
开发者ID:sgh1986915,项目名称:laravel-bizgym,代码行数:28,代码来源:MenuTableDefaultMenuSeeder.php

示例10: run

 public function run()
 {
     DB::table('products')->truncate();
     //DB::table('shop_products')->delete();
     $sql = file_get_contents(app_path() . '/database/sql/products.sql');
     DB::unprepared($sql);
 }
开发者ID:Rotron,项目名称:shop,代码行数:7,代码来源:ProductTableSeeder.php

示例11: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::drop('partners');
     DB::unprepared('DROP VIEW IF EXISTS selectPartners');
     DB::unprepared('DROP VIEW IF EXISTS selectCustomers');
     DB::unprepared('DROP VIEW IF EXISTS selectSuppliers');
 }
开发者ID:raulbravo23,项目名称:salepoint,代码行数:12,代码来源:2015_03_07_231010_create_partners_table.php

示例12: up

 public function up()
 {
     DB::unprepared("ALTER TABLE `deal` CHANGE `company_id` `company_id` INT( 11 ) NULL ;");
     DB::unprepared("ALTER TABLE `deal` ADD `payment_analysis` TINYINT NOT NULL");
     DB::unprepared("UPDATE `deal` SET `payment_analysis` = 1 WHERE `payee_code` IS NOT NULL");
     DB::unprepared("ALTER TABLE deal DROP INDEX payee_code");
 }
开发者ID:alternativex,项目名称:Backend-app,代码行数:7,代码来源:2015_03_24_114520_alter_deal_drop_company_payee.php

示例13: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::table('meals', function ($table) {
         $table->date('locked_date');
     });
     \DB::unprepared("UPDATE meals SET locked_date = date;");
 }
开发者ID:jakobbuis,项目名称:bolknoms2,代码行数:12,代码来源:2015_08_29_214048_ClosingDatesOnASpecificDate.php

示例14: down

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     DB::unprepared('DROP TRIGGER systembrand_insert');
     DB::unprepared('DROP TRIGGER systembrand_update');
     DB::unprepared('DROP TRIGGER systemaccount_insert');
     DB::unprepared('DROP TRIGGER systemaccount_update');
 }
开发者ID:ihatehandles,项目名称:AbuseIO,代码行数:12,代码来源:2016_01_27_143447_create_trigger.php

示例15: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::dropIfExists('journeys');
     Schema::create('journeys', function (Blueprint $table) {
         // Columns
         $table->increments('id');
         $table->string('uuid')->unique();
         $table->integer('traveler')->unsigned();
         $table->string('title');
         $table->date('date');
         $table->string('description_filename');
         $table->string('header_image_filename')->nullable();
         $table->softDeletes();
         $table->timestamps();
         // Foreign Keys
         $table->foreign('traveler')->references('id')->on('travelers');
     });
     // Triggers
     DB::unprepared('
   CREATE TRIGGER `generate_uuid`
   BEFORE INSERT
   ON `journeys`
   FOR EACH ROW
   SET NEW.uuid = UUID()
 ');
 }
开发者ID:Arcrammer,项目名称:Traveling-Children-Project,代码行数:31,代码来源:2015_12_03_133101_CreateJourneysTable.php


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