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
FFilament
Created by Jocka on 9/9/2024 in #❓┊help
How to create a custom page for additional reports?
is the resource required?
8 replies
FFilament
Created by Jocka on 8/25/2024 in #❓┊help
How to make the action column first in the table?
Is that even possible?
4 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
yes sure, sorry for bothering you
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
thank you let me check
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
or is using useFetch not going to solve my problem now?
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
<script>
const fetchProduct = async () => {
loadingProduct.value = true;
const { productSlug } = route.params;
const data = await $fetch(`/products/${productSlug}`, {
baseURL: config.public.apiBaseUrl,
});
product.value = data.product;
otherProducts.value = data.otherProducts;
loadingProduct.value = false;
};

onMounted(async () => await fetchProduct());
</script>
<script>
const fetchProduct = async () => {
loadingProduct.value = true;
const { productSlug } = route.params;
const data = await $fetch(`/products/${productSlug}`, {
baseURL: config.public.apiBaseUrl,
});
product.value = data.product;
otherProducts.value = data.otherProducts;
loadingProduct.value = false;
};

onMounted(async () => await fetchProduct());
</script>
also how can i rewrite this with useFetch in order to fix the issue?
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
Perfect explained, thank you so much.
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
btw the problem when i disable ssr: false is now gone that i explained above, if that means something
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
so in order to have a better SEO i need SSR instead of SSG to get the dynamic data as the SEO meta data?
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
aham, yes indeed
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
and should i put ssr: false if i use pnpm generate to have a SSG site?
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
for example something like this, how i should rewrite it in order to be working fine.
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
<script>
const fetchProduct = async () => {
loadingProduct.value = true;
const { productSlug } = route.params;
const data = await $fetch(`/products/${productSlug}`, {
baseURL: config.public.apiBaseUrl,
});
product.value = data.product;
otherProducts.value = data.otherProducts;
loadingProduct.value = false;
};

onMounted(async () => await fetchProduct());
</script>
<script>
const fetchProduct = async () => {
loadingProduct.value = true;
const { productSlug } = route.params;
const data = await $fetch(`/products/${productSlug}`, {
baseURL: config.public.apiBaseUrl,
});
product.value = data.product;
otherProducts.value = data.otherProducts;
loadingProduct.value = false;
};

onMounted(async () => await fetchProduct());
</script>
62 replies
NNuxt
Created by Jocka on 6/20/2024 in #❓・help
Cannot read properties of null (reading 'insertBefore')
yes, i would like to use the current setup with pnpm generate while i escape this error that i get on refreshing the page where the dynamic route is fetched
62 replies