PippoPizza
PippoPizza
FFilament
Created by PippoPizza on 2/12/2024 in #❓┊help
blade section component scrollable
Hi, how can i make the blade section component scrollable with fixed width? I am writing a chat funcion for my app and want it to make the chat scrollable, instead of an infinite long section component.
15 replies
FFilament
Created by PippoPizza on 2/6/2024 in #❓┊help
Tailwind classes don't show in view
Hi, i'm using filament and tailwind in a custom livewire page like this:

<div class="justify-items-start">
<div class="p-1 rounded-sm border-slate-400 bg-slate-400 ">
{{$message->message}}
</div>
</div>

<div class="justify-items-start">
<div class="p-1 rounded-sm border-slate-400 bg-slate-400 ">
{{$message->message}}
</div>
</div>
but only the p-1 class is working. here's my tailwind.config.js file:
import defaultTheme from 'tailwindcss/defaultTheme';
import forms from '@tailwindcss/forms';
import typography from '@tailwindcss/typography';

/** @type {import('tailwindcss').Config} */
export default {
content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
"./node_modules/flowbite/**/*.js",
'./vendor/laravel/jetstream/**/*.blade.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
'node_modules/preline/dist/*.js',
'./pages/**/*.{html,js}',
'./components/**/*.{html,js}',,
],
import defaultTheme from 'tailwindcss/defaultTheme';
import forms from '@tailwindcss/forms';
import typography from '@tailwindcss/typography';

/** @type {import('tailwindcss').Config} */
export default {
content: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
"./node_modules/flowbite/**/*.js",
'./vendor/laravel/jetstream/**/*.blade.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
'node_modules/preline/dist/*.js',
'./pages/**/*.{html,js}',
'./components/**/*.{html,js}',,
],
How can i solve this?
1 replies
FFilament
Created by PippoPizza on 12/28/2023 in #❓┊help
Attempt to read property "budget" on null
I'm having this issue where it throws this error on this piece of code
$project = Project::find(request()->route()->parameter('project'));
$budget = (int) $project->budget;
$project = Project::find(request()->route()->parameter('project'));
$budget = (int) $project->budget;
The property budget is not null and is read. if I
dd($budget)
dd($budget)
it shows the correct value if I
dd($project)
dd($project)
it shows obviously
App\Models\Project {#2355 ▼ // app/Filament/Condivisore/Resources/QuoteResource.php:56
#connection: "mysql"
#table: "projects"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
+preventsLazyLoading: false
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#escapeWhenCastingToString: false
#attributes: array:10 [▼
"id" => 7
"user_id" => 1
"title" => "Cerco un programmatore"
"slug" => "cerco-un-programmatore"
"banner" => "immagini-progetti/1/cerco-un-programmatore/banner/01HHHRMQWPP5T5E77MARYEWGNE.png"
"images" => "["immagini-progetti\/1\/cerco-un-programmatore\/immagini\/01HHHRMQYSV36TB4DF965ZFV1N.png","immagini-progetti\/1\/cerco-un-programmatore\/immagini\/01HHHRMR03WZH ▶"
"body" => "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ac diam turpis. Sed hendrerit mauris venenatis tortor volutpat, quis vulputate justo co ▶"
"created_at" => "2023-12-13 14:17:42"
"updated_at" => "2023-12-13 14:17:42"
"budget" => "25000"
]
#original: array:10 [▶]
#changes: []
#casts: array:1 [▼
"images" => "array"
]
#classCastCache: []
#attributeCastCache: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: []
#touches: []
+timestamps: true
+usesUniqueIds: false
#hidden: []
#visible: []
#fillable: array:7 [▼
0 => "user_id"
1 => "title"
2 => "slug"
3 => "banner"
4 => "images"
5 => "body"
6 => "budget"
]
#guarded: array:1 [▼
0 => "*"
]
#queuedTags: []
App\Models\Project {#2355 ▼ // app/Filament/Condivisore/Resources/QuoteResource.php:56
#connection: "mysql"
#table: "projects"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
+preventsLazyLoading: false
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#escapeWhenCastingToString: false
#attributes: array:10 [▼
"id" => 7
"user_id" => 1
"title" => "Cerco un programmatore"
"slug" => "cerco-un-programmatore"
"banner" => "immagini-progetti/1/cerco-un-programmatore/banner/01HHHRMQWPP5T5E77MARYEWGNE.png"
"images" => "["immagini-progetti\/1\/cerco-un-programmatore\/immagini\/01HHHRMQYSV36TB4DF965ZFV1N.png","immagini-progetti\/1\/cerco-un-programmatore\/immagini\/01HHHRMR03WZH ▶"
"body" => "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ac diam turpis. Sed hendrerit mauris venenatis tortor volutpat, quis vulputate justo co ▶"
"created_at" => "2023-12-13 14:17:42"
"updated_at" => "2023-12-13 14:17:42"
"budget" => "25000"
]
#original: array:10 [▶]
#changes: []
#casts: array:1 [▼
"images" => "array"
]
#classCastCache: []
#attributeCastCache: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: []
#touches: []
+timestamps: true
+usesUniqueIds: false
#hidden: []
#visible: []
#fillable: array:7 [▼
0 => "user_id"
1 => "title"
2 => "slug"
3 => "banner"
4 => "images"
5 => "body"
6 => "budget"
]
#guarded: array:1 [▼
0 => "*"
]
#queuedTags: []
5 replies
FFilament
Created by PippoPizza on 12/20/2023 in #❓┊help
Attempt to read property "budget" on null
i'm having this error ' Attempt to read property "budget" on null ' when trying to submit this form. The form shows correctly the numbers and also min and max, but wen i try to submit it throws the error.
TextInput::make('quote')
->required()
->numeric()
->maxValue((int)$project->budget)
->minValue((int)$project->budget*0.4)
->prefixIcon('heroicon-s-currency-euro')
->prefix('Min. '.Number::currency($project->budget*0.4, 'EUR', 'fr'))
->suffix('Max. '.Number::currency($project->budget, 'EUR', 'fr'))
->label('Budget'),
Select::make('project_id')
->required()
->relationship(
name: 'project',
titleAttribute: 'slug',
modifyQueryUsing: fn (Builder $query) =>
$query->where('id', request()->route()->parameter('project'))
)
->preload()
->label('Progetto'),
TextInput::make('quote')
->required()
->numeric()
->maxValue((int)$project->budget)
->minValue((int)$project->budget*0.4)
->prefixIcon('heroicon-s-currency-euro')
->prefix('Min. '.Number::currency($project->budget*0.4, 'EUR', 'fr'))
->suffix('Max. '.Number::currency($project->budget, 'EUR', 'fr'))
->label('Budget'),
Select::make('project_id')
->required()
->relationship(
name: 'project',
titleAttribute: 'slug',
modifyQueryUsing: fn (Builder $query) =>
$query->where('id', request()->route()->parameter('project'))
)
->preload()
->label('Progetto'),
Any clue?
2 replies