本文整理汇总了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();
}
示例2: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
// $this->call(UserTableSeeder::class);
$this->call(SudoAdminUser::class);
Model::reguard();
}
示例3: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
// $this->call('UserTableSeeder');
$this->call('UsersSeeder');
Model::reguard();
}
示例4: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->call(ArticleTableSeeder::class);
$this->call(CommentTableSeeder::class);
Model::reguard();
}
示例5: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
factory('App\\User', 100)->create();
Model::reguard();
// $this->call(UserTableSeeder::class);
}
示例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();
}
示例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();
}
示例8: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->call('PostsTableSeeder');
$this->call('CommentsTableSeeder');
Model::reguard();
}
示例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();
}
示例10: run
public function run()
{
Model::unguard();
$this->call("TagTableSeeder");
$this->call("PostTableSeeder");
Model::reguard();
}
示例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();
}
示例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();
}
示例13: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->call(ApplicationSeeder::class);
$this->call(ActorSeeder::class);
Model::reguard();
}
示例14: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->call(TeamsTableSeeder::class);
$this->call(TournamentsTableSeeder::class);
Model::reguard();
}
示例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();
}