-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
5 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Seeder; | ||
|
||
class invoice extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
* | ||
* @return void | ||
*/ | ||
public function run() | ||
{ | ||
$faker = \Faker\Factory::create(); | ||
|
||
for($i = 0; $i < 500; $i++){ | ||
\App\invoice::insert([ | ||
'lease_id' => $faker->numberBetween(1, 61), | ||
'name' => \Illuminate\Support\Str::random(10), | ||
'price' => $faker->numberBetween(5, 150) | ||
]); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Seeder; | ||
|
||
class leases extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
* | ||
* @return void | ||
*/ | ||
public function run() | ||
{ | ||
$faker = \Faker\Factory::create(); | ||
$customers = \App\User::where('role_id', 5)->get(); | ||
|
||
\App\lease::insert([ | ||
'lease_type_id' => 1, | ||
'customer_id' => 21, | ||
'finance_id' => 3, | ||
'startdate' => $faker->date(), | ||
'enddate' => $faker->date(), | ||
'connectioncosts' => 300, | ||
'noticeperiod' => $faker->date() | ||
]); | ||
|
||
for($i = 0; $i < 150; $i++){ | ||
\App\lease::insert([ | ||
'lease_type_id' => $faker->numberBetween(1, 2), | ||
'customer_id' => $faker->numberBetween( 5, 150), | ||
'finance_id' => 3, | ||
'startdate' => $faker->date(), | ||
'enddate' => $faker->date(), | ||
'connectioncosts' => 300, | ||
'noticeperiod' => $faker->date() | ||
]); | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters