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


PHP Model::reguard方法代码示例

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


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

示例1: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     // DB::table('students')->delete();
     $this->call(StudentsSeeder::class);
     Model::reguard();
 }
开发者ID:vergidul,项目名称:verifica_partecipanti_corso,代码行数:12,代码来源:DatabaseSeeder.php

示例2: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     // $this->call(UserTableSeeder::class);
     $this->call(SudoAdminUser::class);
     Model::reguard();
 }
开发者ID:richardblondet,项目名称:tribu,代码行数:12,代码来源:DatabaseSeeder.php

示例3: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     // $this->call('UserTableSeeder');
     $this->call('UsersSeeder');
     Model::reguard();
 }
开发者ID:bigazzzz,项目名称:Laravel-test,代码行数:12,代码来源:DatabaseSeeder.php

示例4: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     $this->call(ArticleTableSeeder::class);
     $this->call(CommentTableSeeder::class);
     Model::reguard();
 }
开发者ID:RemedyNony,项目名称:laravel-commentable-example,代码行数:12,代码来源:DatabaseSeeder.php

示例5: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     factory('App\\User', 100)->create();
     Model::reguard();
     // $this->call(UserTableSeeder::class);
 }
开发者ID:jorgenaranjo,项目名称:crudAngularLaravel,代码行数:12,代码来源:DatabaseSeeder.php

示例6: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     // $this->call('UserTableSeeder');
     \App\Editor::create(['first_name' => 'Andy', 'last_name' => 'Crockett', 'email' => 'andy@hardystudio.com', 'password' => bcrypt('cotton')]);
     Model::reguard();
 }
开发者ID:andycrockett,项目名称:andycrockett,代码行数:12,代码来源:DatabaseSeeder.php

示例7: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     DB::statement('SET FOREIGN_KEY_CHECKS=0;');
     $this->call(ArticleTableSeeder::class);
     $this->call(UserTableSeeder::class);
     $this->call(RoleTableSeeder::class);
     $this->call(CategoryTableSeeder::class);
     $this->call(DailyEventTableSeeder::class);
     $this->call(WeekTableSeeder::class);
     $this->call(ClanTableSeeder::class);
     $this->call(SliderTableSeeder::class);
     $this->call(GalaryTableSeeder::class);
     $this->call(PopupTableSeeder::class);
     $this->call(CardTableSeeder::class);
     $this->call(CardUserTableSeeder::class);
     $this->call(GiftTableSeeder::class);
     $this->call(GiftUsersTableSeeder::class);
     $this->call(ServerTableSeeder::class);
     $this->call(CharacterTbaleSeeder::class);
     $this->call(ItemsTableSeeder::class);
     $this->call(ItemTypeTableSeeder::class);
     $this->call(GiftFresherTableSeeder::class);
     $this->call(QuaDatMocTableSeeder::class);
     DB::statement('SET FOREIGN_KEY_CHECKS=1;');
     Model::reguard();
 }
开发者ID:louisthaihv,项目名称:colong,代码行数:32,代码来源:DatabaseSeeder.php

示例8: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     $this->call('PostsTableSeeder');
     $this->call('CommentsTableSeeder');
     Model::reguard();
 }
开发者ID:KoichiTakashiro,项目名称:CodeReview_System,代码行数:12,代码来源:DatabaseSeeder.php

示例9: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     //call the seeds for the user table to be used.
     $this->call(UsersTableSeeder::class);
     Model::reguard();
 }
开发者ID:ahmed-alaa,项目名称:credit-card,代码行数:12,代码来源:DatabaseSeeder.php

示例10: run

 public function run()
 {
     Model::unguard();
     $this->call("TagTableSeeder");
     $this->call("PostTableSeeder");
     Model::reguard();
 }
开发者ID:kohrVid,项目名称:L5Beauty,代码行数:7,代码来源:DatabaseSeeder.php

示例11: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     // $this->call(UserTableSeeder::class);
     //        factory(Location::class, 100)->create();
     //
     //        $faker = Faker::create();
     //
     //        for ($i=0; $i<3; $i++) {
     //            $location = Location::pickUnused(1);
     //            $target = Target::fromLocationWithCoordinates($location->id, $faker->randomNumber(8));
     //            $decoys = Target::decoysFromLocations(Location::pickUnused(4));
     //            $experiment = Experiment::fromTargetAndDecoys($target, $decoys);
     //            $experiment->start_date = Carbon\Carbon::now();
     //            $experiment->save();
     //        }
     //        DB::table('users')->truncate();
     //
     //        User::create([
     //            'name' => 'Anthony',
     //            'email'     => 'acuccia@gmail.com',
     //            'password'  => bcrypt('acrv2015'),
     //            'is_admin'  => true
     //        ]);
     Model::reguard();
 }
开发者ID:acuccia,项目名称:remote-viewing,代码行数:31,代码来源:DatabaseSeeder.php

示例12: run

 /**
  * Run the database seeds. Note these seeds are used for production server.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     $this->call(RequiredTableSeeder::class);
     $this->call(OptionalTableSeeder::class);
     Model::reguard();
 }
开发者ID:ahk-ch,项目名称:chamb.net,代码行数:12,代码来源:DatabaseSeeder.php

示例13: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     $this->call(ApplicationSeeder::class);
     $this->call(ActorSeeder::class);
     Model::reguard();
 }
开发者ID:diogofrancoweb,项目名称:use-case-management,代码行数:12,代码来源:ApiTableSeeder.php

示例14: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     $this->call(TeamsTableSeeder::class);
     $this->call(TournamentsTableSeeder::class);
     Model::reguard();
 }
开发者ID:rexwang,项目名称:dota_playground,代码行数:12,代码来源:DatabaseSeeder.php

示例15: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     $data = json_decode(file_get_contents('database/scraped/coursesFall2016.json'));
     foreach ($data as $course) {
         // Requirements for course
         $faculty_id = Faculty::firstOrCreate(['name' => $course->faculty])->id;
         $name = substr($course->title, 0, -2);
         $number = $course->classNum;
         $credits = 3.0;
         // TODO delete this from the database
         $description = 'No description of the course.';
         // TODO maybe delete this from the database
         // end requirements for course
         // Requirements for scheduled_course
         $course_id = Course::firstOrCreate(['name' => $name, 'number' => $number, 'credits' => $credits, 'description' => $description, 'faculty_id' => $faculty_id])->id;
         $session_id = Session::firstOrCreate(['name' => $course->semester])->id;
         // end requirements for scheduled_course
         // Requirements for time_slot
         $scheduled_course_id = ScheduledCourse::firstOrCreate(['course_id' => $course_id, 'session_id' => $session_id])->id;
         if ($course->day != 'TBA') {
             $section = $course->section;
             $room = $course->room;
             $time_start = $course->timeBegin;
             $time_end = $course->timeEnd;
             $course_type_id = $this->getType($course->type)->id;
             //                $days = explode(';', preg_replace('/;$/', '', chunk_split($course->day, 2, ';')));
             $day = $course->day;
             //                    $day_of_week_id = $this->getDay($day)->id;
             TimeSlot::firstOrCreate(['scheduled_course_id' => $scheduled_course_id, 'section' => $section, 'room' => $room, 'time_start' => $time_start, 'time_end' => $time_end, 'day' => $day, 'course_type_id' => $course_type_id]);
         }
     }
     Model::reguard();
 }
开发者ID:ApolloSoen341,项目名称:apollo-website,代码行数:39,代码来源:ScrapeSeeder.php


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