torriv
torriv
FFilament
Created by agaitan026 on 9/21/2024 in #❓┊help
dashboard widget looks weird
i'm getting the same on all my charts after latest update too. trying to figure it out.
18 replies
FFilament
Created by FaijaPelaa on 4/8/2024 in #❓┊help
Email verification does not send email. Fix by installing Breeze??
I have exact same problem. update: this solved it in production but not in local. Changing QUEUE_CONNECTION=database to QUEUE_CONNECTION=sync
3 replies
FFilament
Created by Ayman Alhattami on 11/3/2023 in #❓┊help
How can I get the uploaded file before saving data
what do you need to do to the file before saving data to the database?
8 replies
FFilament
Created by Ayman Alhattami on 11/3/2023 in #❓┊help
How can I get the uploaded file before saving data
8 replies
FFilament
Created by Kornel on 10/31/2023 in #❓┊help
How to show a field only in create record
->hiddenOn('edit'),
->required(fn(string $operation) => $operation == 'create'),
->hiddenOn('edit'),
->required(fn(string $operation) => $operation == 'create'),
https://filamentphp.com/docs/3.x/panels/resources/getting-started#hiding-components-based-on-the-current-operation https://filamentphp.com/docs/3.x/forms/advanced#injecting-the-current-form-operation
4 replies
FFilament
Created by torriv on 10/30/2023 in #❓┊help
showing headerActions based on what tab you are on
bump
3 replies
FFilament
Created by Lara Zeus on 10/8/2023 in #❓┊help
repeater - anonymous action - fillForm
7 replies
FFilament
Created by ciorici on 10/26/2023 in #❓┊help
Reuse filament select multiple in custom component
the way i did it was making a trait.
trait YourTraitName
{
public static function yourFunctionName(): array
{
return [
Select::make('status')->options([
'draft' => 'Draft',
'reviewing' => 'Reviewing',
'published' => 'Published',
]),
];
}
}
trait YourTraitName
{
public static function yourFunctionName(): array
{
return [
Select::make('status')->options([
'draft' => 'Draft',
'reviewing' => 'Reviewing',
'published' => 'Published',
]),
];
}
}
then in your resource form:
use App\Traits\YourTraitName;

public static function form(Form $form): Form{
return $form->schema([
...self::yourFunctionName(),
//other fields
]);
}
use App\Traits\YourTraitName;

public static function form(Form $form): Form{
return $form->schema([
...self::yourFunctionName(),
//other fields
]);
}
6 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
Perfect! thank you 🙂
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
i'm just doing this in a helper file:
function getIntensityColorClass($intensity): string
{
return match ($intensity) {
'crimson' => 'bg-red-500',
'darkcyan' => 'bg-cyan-500',
'green' => 'bg-green-500',
default => '',
};
}
function getIntensityColorClass($intensity): string
{
return match ($intensity) {
'crimson' => 'bg-red-500',
'darkcyan' => 'bg-cyan-500',
'green' => 'bg-green-500',
default => '',
};
}
and $intensity values are from DB.
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
just something else i found out: if i do like this:
<td class="text-center py-2 px-2 border-t dark:border-gray-600 border-gray-500 {{ $exercise !== null && isset($exercise['intensity']) ? getIntensityColorClass($exercise['intensity']) : '' }}"
<td class="text-center py-2 px-2 border-t dark:border-gray-600 border-gray-500 {{ $exercise !== null && isset($exercise['intensity']) ? getIntensityColorClass($exercise['intensity']) : '' }}"
it won't generate the colors, but if i hardcode them first and recompile, and then put back the dynamic code. it works. is this normal?
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
That was it!! thank you!! 🙂
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
no problem 🙂 i also checked devtools, and it is using the correct theme. resources/css/filament/landslag/theme.css
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
nothing changed after npm run build and also clear cache
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
@import '/vendor/filament/filament/resources/css/theme.css'; @config 'tailwind.config.js';
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
Thank you 🙂
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
ok. i removed storage, and cleared all cache. no changes. just to make sure everything is set up correctly, here is the files: tailwind.config.js (root)
const defaultTheme = require('tailwindcss/defaultTheme');

/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
'./resources/views/**/*.blade.php',
],

theme: {
extend: {
fontFamily: {
sans: ['Nunito', ...defaultTheme.fontFamily.sans],
},
},
},

plugins: [require('@tailwindcss/forms')],
};
const defaultTheme = require('tailwindcss/defaultTheme');

/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
'./resources/views/**/*.blade.php',
],

theme: {
extend: {
fontFamily: {
sans: ['Nunito', ...defaultTheme.fontFamily.sans],
},
},
},

plugins: [require('@tailwindcss/forms')],
};
vite.config.js
import {defineConfig} from 'vite';
import laravel, {refreshPaths} from 'laravel-vite-plugin'

export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
`resources/css/filament/landslag/theme.css`,
],
refresh: [
...refreshPaths,
'app/Livewire/**',
'app/Filament/**',
'app/Providers/Filament/**',
],
}),
],

server: {
hmr: {
host: 'localhost',
},
},
});
import {defineConfig} from 'vite';
import laravel, {refreshPaths} from 'laravel-vite-plugin'

export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
`resources/css/filament/landslag/theme.css`,
],
refresh: [
...refreshPaths,
'app/Livewire/**',
'app/Filament/**',
'app/Providers/Filament/**',
],
}),
],

server: {
hmr: {
host: 'localhost',
},
},
});
resources\css\filament\landslag\tailwind.config.js
import preset from '../../../../vendor/filament/filament/tailwind.config.preset'

export default {
presets: [preset],
content: [
'./app/Filament/Landslag/**/*.php',
'./resources/views/filament/landslag/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
],
}
import preset from '../../../../vendor/filament/filament/tailwind.config.preset'

export default {
presets: [preset],
content: [
'./app/Filament/Landslag/**/*.php',
'./resources/views/filament/landslag/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
],
}
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
Thanks. i'll do that if i can't figure it out. but there should be possible without it.
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
might be from when i had v2? not sure.
47 replies
FFilament
Created by torriv on 10/21/2023 in #❓┊help
Add styles to tailwind
nope, 🙂 i have two asterisk there
47 replies