johny7
johny7
FFilament
Created by johny7 on 10/19/2023 in #❓┊help
GMail Mailer for laravel/filament
Found it now by myself via https://medium.com/@laraveltuts/how-to-send-mail-using-gmail-in-laravel-9-76d110779a4a You have to create an App Password via https://myaccount.google.com/apppasswords and can use it in .envlike:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=myusername@gmail.com
MAIL_PASSWORD="the created app password"
MAIL_ENCRYPTION=ssl
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=myusername@gmail.com
MAIL_PASSWORD="the created app password"
MAIL_ENCRYPTION=ssl
4 replies
FFilament
Created by _jimmy on 10/24/2023 in #❓┊help
Controlling modals in an action
Have you tried to use validation instead?
6 replies
FFilament
Created by Xiquita on 10/24/2023 in #❓┊help
Select Disable when published
Your condition says, the Select brand_id should be disabled, when it's own value is brand_id. I think, when you select an option from the relationship brands, you will get an integer ID of the brand, but never the value brand_id. So your condition will never match. Maybe
->disableOptionWhen(fn (string $value):bool => $value!==null),
->disableOptionWhen(fn (string $value):bool => $value!==null),
is, what you are seeking for, because the value will be null, when brand_id is not set.
25 replies
FFilament
Created by johny7 on 10/10/2023 in #❓┊help
How to call the second action after submitting the first action-form?
Of course, here you are:
<?php

namespace App\Filament\Resources\ProbeResource\Pages;

use App\Filament\Resources\ProbeResource;
use Filament\Resources\Pages\EditRecord;
use Filament\Actions;

class EditProbe extends EditRecord
{
protected static string $resource = ProbeResource::class;

protected function getHeaderActions(): array
{
return [
Actions\Action::make("awl")
->form([
# Form Data here
])
->extraModalFooterActions(function (Actions\Action $action) {
return [
$action->make('save')
->action(function () {
$data = $this->mountedActionsData[0]['anwesenheiten']; // Get Form Data
Anwesenheit::upsert($data, ['id']); // Save Form Data
})
->close(true),
Actions\Action::make('saveNjump')
->action(function () {
$data = $this->mountedActionsData[0]['anwesenheiten']; // Get Form Data
Anwesenheit::upsert($data, ['id']); // Save Form Data
$this->replaceMountedAction("targetaction", []); // jump to next Action
})
];
}),
// Other Header Actions
];
}
}
<?php

namespace App\Filament\Resources\ProbeResource\Pages;

use App\Filament\Resources\ProbeResource;
use Filament\Resources\Pages\EditRecord;
use Filament\Actions;

class EditProbe extends EditRecord
{
protected static string $resource = ProbeResource::class;

protected function getHeaderActions(): array
{
return [
Actions\Action::make("awl")
->form([
# Form Data here
])
->extraModalFooterActions(function (Actions\Action $action) {
return [
$action->make('save')
->action(function () {
$data = $this->mountedActionsData[0]['anwesenheiten']; // Get Form Data
Anwesenheit::upsert($data, ['id']); // Save Form Data
})
->close(true),
Actions\Action::make('saveNjump')
->action(function () {
$data = $this->mountedActionsData[0]['anwesenheiten']; // Get Form Data
Anwesenheit::upsert($data, ['id']); // Save Form Data
$this->replaceMountedAction("targetaction", []); // jump to next Action
})
];
}),
// Other Header Actions
];
}
}
8 replies
FFilament
Created by johny7 on 10/10/2023 in #❓┊help
How to call the second action after submitting the first action-form?
This works very fine! Just had to use Action::make() instead of $action->makeModalSubmitAction()
8 replies
FFilament
Created by johny7 on 10/10/2023 in #❓┊help
How to call the second action after submitting the first action-form?
Thank you very much, I'll try this.
8 replies
FFilament
Created by MRBUG on 10/10/2023 in #❓┊help
clickable widget with filter
Add to your Stat::-Methods the following:
->extraAttributes([
'wire:click' => 'goToProject()'
])
->extraAttributes([
'wire:click' => 'goToProject()'
])
And in your WidgetClass define a new function:
function goToProject()
{
redirect(ProjectResource::getUrl());
}
function goToProject()
{
redirect(ProjectResource::getUrl());
}
4 replies
FFilament
Created by paulReal on 10/10/2023 in #❓┊help
How to set the Dashboard columns to 3 using custom widgets
In my case
class Dashboard extends BasePage
{
public function getColumns(): int | string | array
{
return 1;
}

}
class Dashboard extends BasePage
{
public function getColumns(): int | string | array
{
return 1;
}

}
works properly.
14 replies
FFilament
Created by johny7 on 9/29/2023 in #❓┊help
Use filament custom theme without npm/node
I found the error: file public\hot coontains http://[::1]:5173/, after deleting it, the right references appears.
14 replies
FFilament
Created by johny7 on 9/29/2023 in #❓┊help
Use filament custom theme without npm/node
Hm. When I run npm run buildI became a broken template. Running npm run devthe vite server is runs and I get a working template. Shuting down the vite server, the template brokes. Using ->viteTheme('resources/css/filament/app/theme.css')in the PanelServiceProvider my template references assets at the vite server:
<script type="module" src="http://[::1]:5173/@vite/client"></script>
<link rel="stylesheet" href="http://[::1]:5173/resources/css/filament/app/theme.css" />
<script type="module" src="http://[::1]:5173/@vite/client"></script>
<link rel="stylesheet" href="http://[::1]:5173/resources/css/filament/app/theme.css" />
So how can I use my template without an active vite-server? The generated assets at public\build... aren't used anywhere. What I'm doing wrong?
14 replies
FFilament
Created by johny7 on 9/29/2023 in #❓┊help
Use filament custom theme without npm/node
For my understanding: Into which directories is compiling done with npm run dev or npm run build?
14 replies
FFilament
Created by johny7 on 9/29/2023 in #❓┊help
Use filament custom theme without npm/node
This is just the only one that offers me the required scope of services for free.
14 replies
FFilament
Created by johny7 on 9/29/2023 in #❓┊help
Use filament custom theme without npm/node
Thank you very much for these approaches, in any case, you are already helping me. I guess this will help me in any case. Otherwise, I would look up here again for more in-depth questions.
14 replies