Skip to content

Commit 2e98ef1

Browse files
committed
Fix point , cek greget , gawe hiasan :v
1 parent 0804ab6 commit 2e98ef1

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

app/Http/Controllers/Auth/RegisterController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ protected function validator(array $data)
5252
'name' => 'required|string|max:255',
5353
'email' => 'required|string|email|max:255|unique:users',
5454
'password' => 'required|string|min:6|confirmed',
55+
5556
]);
5657
}
5758

@@ -67,6 +68,7 @@ protected function create(array $data)
6768
'name' => $data['name'],
6869
'email' => $data['email'],
6970
'password' => Hash::make($data['password']),
71+
'point' => 10,
7072
]);
7173
}
7274
}

app/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class User extends Authenticatable
1515
* @var array
1616
*/
1717
protected $fillable = [
18-
'name', 'email', 'password',
18+
'name', 'email', 'password','point'
1919
];
2020

2121
/**

database/factories/UserFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
'name' => $faker->name,
1919
'email' => $faker->unique()->safeEmail,
2020
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
21-
// 'point' => $faker->randomNumber,
21+
'point' => $faker->randomNumber,
2222
'remember_token' => str_random(10),
2323
];
2424
});

database/migrations/2014_10_12_000000_create_users_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function up()
1818
$table->string('name');
1919
$table->string('email')->unique();
2020
$table->string('password');
21-
//$table->integer('point')->default(0);
21+
$table->integer('point')->default(10);
2222
$table->rememberToken();
2323
$table->timestamps();
2424
});

resources/views/profile.blade.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@extends('layouts.app')
2+
@section('content')
13
<!DOCTYPE html>
24
<html>
35
<head>
@@ -23,15 +25,17 @@
2325
<i class="pointing icon"></i> Point
2426
</div>
2527
<a class="ui basic left pointing blue label">
26-
{{$count}}
28+
@foreach ($user as $a)
29+
{{$a->point}}
30+
@endforeach
2731
</a>
2832
</div>
2933
<div class="post">
3034
<div class="ui button">
3135
<i class="pointing icon"></i> Post
3236
</div>
3337
<a class="ui basic left pointing blue label">
34-
{{$count}}
38+
{{$count}}
3539
</a>
3640
</div>
3741

0 commit comments

Comments
 (0)