@@ -9,8 +9,7 @@ discard block |
||
| 9 | 9 | use Illuminate\Contracts\Auth\MustVerifyEmail; |
| 10 | 10 | use Illuminate\Foundation\Auth\User as Authenticatable; |
| 11 | 11 | |
| 12 | -class Doctor extends Authenticatable |
|
| 13 | -{ |
|
| 12 | +class Doctor extends Authenticatable { |
|
| 14 | 13 | use Notifiable; |
| 15 | 14 | |
| 16 | 15 | protected $guard = 'doctor'; |
@@ -74,11 +73,13 @@ discard block |
||
| 74 | 73 | return $this->belongsTo('App\DoctorSpecialization', 'specialization_id'); |
| 75 | 74 | } |
| 76 | 75 | |
| 77 | - public function city() { |
|
| 76 | + public function city() |
|
| 77 | + { |
|
| 78 | 78 | return $this->belongsTo('App\City', 'city_id'); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - public function thread() { |
|
| 81 | + public function thread() |
|
| 82 | + { |
|
| 82 | 83 | return $this->hasMany('App\Thread', 'doctor_id'); |
| 83 | 84 | } |
| 84 | 85 | |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | use App\Thread; |
| 8 | 8 | use App\ThreadTopic; |
| 9 | 9 | |
| 10 | -class ThreadAskController extends Controller |
|
| 11 | -{ |
|
| 10 | +class ThreadAskController extends Controller { |
|
| 12 | 11 | public function __construct() |
| 13 | 12 | { |
| 14 | 13 | $this->middleware('auth', ['except' => [ |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | use App\ThreadTopic; |
| 7 | 7 | use Illuminate\Support\Facades\Auth; |
| 8 | 8 | |
| 9 | -class ThreadController extends Controller |
|
| 10 | -{ |
|
| 9 | +class ThreadController extends Controller { |
|
| 11 | 10 | public function __construct() |
| 12 | 11 | { |
| 13 | 12 | $this->middleware('auth:admin', ['except' => [ |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | use Illuminate\Http\Request; |
| 7 | 7 | use Illuminate\Support\Facades\Auth; |
| 8 | 8 | |
| 9 | -class ThreadAnswerController extends Controller |
|
| 10 | -{ |
|
| 9 | +class ThreadAnswerController extends Controller { |
|
| 11 | 10 | public function __construct() |
| 12 | 11 | { |
| 13 | 12 | $this->middleware('auth:doctor'); |