mirror of
https://github.com/robonen/education-project.git
synced 2026-03-20 02:44:31 +00:00
Merge branch 'journal' into timetable
# Conflicts: # app/Http/Controllers/Auth/LoginController.php # app/Http/Controllers/Auth/RegisterController.php # app/Http/Controllers/TimetableController.php # app/Models/SchoolClass.php # app/Models/User.php # composer.lock
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
@@ -10,8 +11,11 @@ class Student extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $guarded = [
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
];
|
||||
|
||||
protected $guarded = [
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
@@ -21,7 +25,11 @@ class Student extends Model
|
||||
|
||||
public function schoolClass()
|
||||
{
|
||||
return $this->belongsTo(SchoolClass::class, 'class_id');
|
||||
return $this->belongsTo(SchoolClass::class, 'class_id')->where('');
|
||||
}
|
||||
public function scores()
|
||||
{
|
||||
return $this->hasMany(Journal::class, 'student_id');
|
||||
}
|
||||
|
||||
public function user()
|
||||
|
||||
Reference in New Issue
Block a user