mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
new forms added for courses
This commit is contained in:
@@ -42,6 +42,13 @@ class Course extends Resource
|
||||
'name',
|
||||
];
|
||||
|
||||
public static $with = [
|
||||
'lecturer.team',
|
||||
'categories',
|
||||
'tags',
|
||||
'createdBy',
|
||||
];
|
||||
|
||||
public static function label()
|
||||
{
|
||||
return __('Course');
|
||||
@@ -55,7 +62,7 @@ class Course extends Resource
|
||||
public static function relatableLecturers(NovaRequest $request, $query, Field $field)
|
||||
{
|
||||
if ($field instanceof BelongsTo) {
|
||||
$query->where('team_id', $request->user()->current_team_id);
|
||||
$query->where('created_by', $request->user()->id);
|
||||
}
|
||||
|
||||
return $query;
|
||||
|
||||
Reference in New Issue
Block a user