Jpac14
Jpac14
Explore posts from servers
FFilament
Created by Jpac14 on 10/2/2024 in #❓┊help
Disable tenant slug
Hey everybody, I am trying to get stancl/tenancy and filament working together. I have all the images and all that working, but I am trying to use your tenancy pages (https://filamentphp.com/docs/3.x/panels/tenancy#overview), like signup and that. But I also want to use their billing features. the problem is I have this so far
return $panel
->default()
->id('tenant')
->path('')
->login()
->brandName(fn () => tenant('name'))
->brandLogo(fn () => tenant_asset(tenant('logo')))
->favicon(fn () => tenant_asset(tenant('favicon')))
->tenant(Tenant::class, slugAttribute: null)
return $panel
->default()
->id('tenant')
->path('')
->login()
->brandName(fn () => tenant('name'))
->brandLogo(fn () => tenant_asset(tenant('logo')))
->favicon(fn () => tenant_asset(tenant('favicon')))
->tenant(Tenant::class, slugAttribute: null)
But I want to turn off the added slug, because it I am using subdomain identification from stancl. And when once I login I get redirect to a page that doesn't exist. is this somehow possible to combine both worlds, use the billing and tenant signup pages + stancl? I can provided any other files if needed. Any help would be appreciated.
15 replies
FFilament
Created by Jpac14 on 8/22/2024 in #❓┊help
How can I pass a URL to Widget on panel initialisation?
I want to add quicklinks to my dashboard and have created a custom widget to do so. This is the code I have so far
<?php

namespace App\Filament\Widgets;

use Filament\Widgets\Widget;

class QuickLinkWidget extends Widget
{
protected static string $view = 'widgets.quick-link-widget';

public $title;
public $icon;
public $description;
public $url;
}
<?php

namespace App\Filament\Widgets;

use Filament\Widgets\Widget;

class QuickLinkWidget extends Widget
{
protected static string $view = 'widgets.quick-link-widget';

public $title;
public $icon;
public $description;
public $url;
}
<a href={{ $url }}>
<x-filament-widgets::widget>
<x-filament::section>
<div class="flex gap-4 items-center">
@svg($icon, 'h-8 w-8 text-gray-500')
<div>
<span class="font-bold">{{ $title }}</span>
<p class="text-xs text-gray-500">{{ $description }}</p>
</div>
</div>
</x-filament::section>
</x-filament-widgets::widget>
</a>
<a href={{ $url }}>
<x-filament-widgets::widget>
<x-filament::section>
<div class="flex gap-4 items-center">
@svg($icon, 'h-8 w-8 text-gray-500')
<div>
<span class="font-bold">{{ $title }}</span>
<p class="text-xs text-gray-500">{{ $description }}</p>
</div>
</div>
</x-filament::section>
</x-filament-widgets::widget>
</a>
->widgets([
Widgets\AccountWidget::class,
PointsTallyWidget::class,
QuickLinkWidget::make([
'title' => 'Add Points',
'icon' => 'heroicon-o-plus-circle',
'description' => 'Add points to students',
'url' => AddPointsByStudent::getUrl(),
])
])
->widgets([
Widgets\AccountWidget::class,
PointsTallyWidget::class,
QuickLinkWidget::make([
'title' => 'Add Points',
'icon' => 'heroicon-o-plus-circle',
'description' => 'Add points to students',
'url' => AddPointsByStudent::getUrl(),
])
])
in AdminPanelProvider.php But when I try this code I get this error Call to a member function generateRouteName() on null https://flareapp.io/share/87nLqw4m#top I am guessing it because the ::getUrl doesn't work to the panel is initalised is there any way to fix or get around this. any help appreciated thanks
6 replies
FFilament
Created by Jpac14 on 8/21/2024 in #❓┊help
Is it possible to change the background of each like little tag indiviually dependening on the optio
No description
3 replies
DIAdiscord.js - Imagine an app
Created by Jpac14 on 5/4/2024 in #djs-questions
Can I use the API to access /users/@me
I was looking at the documentation and was looking through the API class in core package, and noticed that it has a usersapi but no functon for /users/@me instead you must provide and ID, is there an alternative? I doing OAUTH stuff want to access user details on behalf of them.
7 replies