當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。