PHP 클래스 Devise\Support\DeviseSeeder

상속: extends Illuminate\Database\Seeder
파일 보기 프로젝트 열기: devisephp/cms

공개 메소드들

메소드 설명
findOrCreateRow ( string $tableName, array $uniqueKeys, array $data, $timestamps = true ) : StdObject We are creating a new page when it does not exist already.
run ( ) : void Run the database seeds.

보호된 메소드들

메소드 설명
callOnlyOnce ( [type] $seederClass ) : [type] This gives us the ability to call the seeds only once. We will keep up with what classes have ran in the database and that way we know which ones to call and which ones not to call.
findOrCreateRows ( string $tableName, array | string $uniqueKeys, $rows, boolean $timestamps = true ) : array Iterate over all the rows and insert them one by one checking for existing before
findRow ( string $tableName, array $uniqueKeys, array $data ) : StdObject Search for the row with these unique keys

메소드 상세

callOnlyOnce() 보호된 메소드

This gives us the ability to call the seeds only once. We will keep up with what classes have ran in the database and that way we know which ones to call and which ones not to call.
protected callOnlyOnce ( [type] $seederClass ) : [type]
$seederClass [type]
리턴 [type]

findOrCreateRow() 공개 메소드

We use the route name as it should be unique. If an row already exists with the same route name we just ignore the insert. We use similiar logic for new page versions. If a page does not have a page version then it will not be available at it's url because we don't show pages unless there is an active page version
public findOrCreateRow ( string $tableName, array $uniqueKeys, array $data, $timestamps = true ) : StdObject
$tableName string
$uniqueKeys array
$data array
리턴 StdObject

findOrCreateRows() 보호된 메소드

Iterate over all the rows and insert them one by one checking for existing before
protected findOrCreateRows ( string $tableName, array | string $uniqueKeys, $rows, boolean $timestamps = true ) : array
$tableName string
$uniqueKeys array | string
$timestamps boolean
리턴 array

findRow() 보호된 메소드

Search for the row with these unique keys
protected findRow ( string $tableName, array $uniqueKeys, array $data ) : StdObject
$tableName string
$uniqueKeys array
$data array
리턴 StdObject

run() 공개 메소드

Run the database seeds.
public run ( ) : void
리턴 void