PHP Класс Devise\Support\DeviseSeeder

Наследование: extends Illuminate\Database\Seeder
Показать файл Открыть проект

Открытые методы

Метод Описание
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