Merge pull request #1 from nabeelio/master
Just when I thought I was out, they pull me back in!
This commit is contained in:
@@ -24,6 +24,7 @@ class Pirep extends Model
|
||||
= [
|
||||
'user_id',
|
||||
'flight_id',
|
||||
'airline_id',
|
||||
'aircraft_id',
|
||||
'flight_time',
|
||||
'route_code',
|
||||
|
||||
@@ -86,6 +86,14 @@ class User extends Authenticatable
|
||||
return $this->airline->code.str_pad($this->id, 3, '0', STR_PAD_LEFT);
|
||||
}
|
||||
|
||||
public function gravatar()
|
||||
{
|
||||
$size = 80;
|
||||
$default = 'https://en.gravatar.com/userimage/12856995/7c7c1da6387853fea65ff74983055386.png';
|
||||
return "https://www.gravatar.com/avatar/" .
|
||||
md5( strtolower( trim( $this->email) ) ) . "?d=" . urlencode( $default ) . "&s=" . $size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Foreign Keys
|
||||
*/
|
||||
|
||||
@@ -20,12 +20,40 @@ users:
|
||||
flight_time: 43200
|
||||
created_at: now
|
||||
updated_at: now
|
||||
- id: 2
|
||||
name: Carla Walters
|
||||
email: carla.walters68@example.com
|
||||
password: admin
|
||||
rank_id: 1
|
||||
airline_id: 1
|
||||
home_airport_id: 2
|
||||
curr_airport_id: 2
|
||||
flights: 1
|
||||
flight_time: 43200
|
||||
created_at: now
|
||||
updated_at: now
|
||||
- id: 3
|
||||
name: Raymond Pearson
|
||||
email: raymond.pearson56@example.com
|
||||
password: admin
|
||||
rank_id: 1
|
||||
airline_id: 1
|
||||
home_airport_id: 2
|
||||
curr_airport_id: 2
|
||||
flights: 1
|
||||
flight_time: 43200
|
||||
created_at: now
|
||||
updated_at: now
|
||||
|
||||
role_user:
|
||||
- user_id: 1
|
||||
role_id: 1
|
||||
- user_id: 1
|
||||
role_id: 2
|
||||
- user_id: 2
|
||||
role_id: 2
|
||||
- user_id: 3
|
||||
role_id: 2
|
||||
|
||||
# ranks
|
||||
ranks:
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</h3>
|
||||
<div class="photo-container">
|
||||
<img class="rounded-circle"
|
||||
src="https://en.gravatar.com/userimage/12856995/7c7c1da6387853fea65ff74983055386.png">
|
||||
src="{!! $user->gravatar() !!}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="content content-center">
|
||||
|
||||
Reference in New Issue
Block a user