Jocka
Jocka
Explore posts from servers
FFilament
Created by Jocka on 11/27/2024 in #❓┊help
Relationship manager not showing attribute.
No description
6 replies
FFilament
Created by Jocka on 11/27/2024 in #❓┊help
Relationship manager not showing attribute.
when i dd this in the resource
dd(CourseBundle::with('courses')->get()->toArray());
dd(CourseBundle::with('courses')->get()->toArray());
6 replies
FFilament
Created by Jocka on 11/27/2024 in #❓┊help
Relationship manager not showing attribute.
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;

class CourseBundle extends Model
{
use HasFactory;

protected $guarded = ['id'];

public function courses(): BelongsToMany
{
return $this->belongsToMany(Course::class, 'course_course_bundles', 'course_bundle_id', 'course_id')
->withTimestamps();
}
}
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;

class CourseBundle extends Model
{
use HasFactory;

protected $guarded = ['id'];

public function courses(): BelongsToMany
{
return $this->belongsToMany(Course::class, 'course_course_bundles', 'course_bundle_id', 'course_id')
->withTimestamps();
}
}
6 replies
FFilament
Created by Jocka on 11/27/2024 in #❓┊help
Relationship manager not showing attribute.
And here is the CourseBundle model
6 replies
FFilament
Created by Jocka on 11/27/2024 in #❓┊help
Relationship manager not showing attribute.
6 replies
FFilament
Created by Jocka on 9/9/2024 in #❓┊help
How to create a custom page for additional reports?
because the reports are not related to a single resource?
8 replies