updated user has many booking to bookings

added index booking with user marking
added turncate marking when seeding
added turncate settingmalaysiabank when seeding
added marking to user seeder
This commit is contained in:
Jack Goh
2018-07-07 12:06:21 +08:00
parent 2a8f5c0b3c
commit 59fc234ea0
7 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ class BookTableSeeder extends Seeder
'rate_id' => $rate->id,
'user_id' => $user->id,
'status' => 2,
'admin_status' => 1,
'admin_status' => 2,
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
]);
+1
View File
@@ -11,6 +11,7 @@ class MarkingSeeder extends Seeder
*/
public function run()
{
DB::table('markings')->truncate();
DB::table('markings')->insert([
'marking' => 'hehe',
'email' => 'hehe@gmail.com'
@@ -11,6 +11,7 @@ class SettingMalaysiaBankSeeder extends Seeder
*/
public function run()
{
DB::table('setting_malaysia_banks')->truncate();
DB::table('setting_malaysia_banks')->insert([
'company_name' => 'CIEF',
'bank_name' => 'Maybank',
+2 -2
View File
@@ -16,8 +16,8 @@ class UsersTableSeeder extends Seeder
DB::table('users')->delete();
$users = array(
['name' => 'User', 'email' => 'user@example.com', 'password' => Hash::make('secret')],
['name' => 'Admin', 'email' => 'admin@example.com', 'password' => Hash::make('secret')],
['name' => 'User', 'marking'=> 'X9', 'email' => 'user@example.com', 'password' => Hash::make('secret')],
['name' => 'Admin', 'marking'=> 'X10', 'email' => 'admin@example.com', 'password' => Hash::make('secret')],
);
foreach ($users as $user)