black ka1ser
black ka1ser
FFilament
Created by black ka1ser on 8/21/2024 in #❓┊help
custom login page: render hooks or override class?
No description
21 replies
FFilament
Created by black ka1ser on 8/21/2024 in #❓┊help
im trying to display a simple TextColumn but nothing shows up
it didnt even dd(). has_uploaded_receipt is not a column name in db, i just want to create a custom one and format based on user relation with receipt.
TextColumn::make('has_uploaded_receipt')
->label('Has uploaded receipt?')
->formatStateUsing( function ($record) {
dd($record);
}),
TextColumn::make('has_uploaded_receipt')
->label('Has uploaded receipt?')
->formatStateUsing( function ($record) {
dd($record);
}),
original code:
TextColumn::make('has_uploaded_receipt')->label('Has uploaded receipt?')->formatStateUsing(fn(User $record): string => $record->receipt() ? "Yes" : "No"),
TextColumn::make('has_uploaded_receipt')->label('Has uploaded receipt?')->formatStateUsing(fn(User $record): string => $record->receipt() ? "Yes" : "No"),
14 replies
FFilament
Created by black ka1ser on 3/3/2024 in #❓┊help
what is the best practice for adding a line break in the table?
i didnt know how, but i have created a file with only <br> inside and called it in my filament table using view::make() haha
8 replies
FFilament
Created by black ka1ser on 3/3/2024 in #❓┊help
unable to adjust padding for livewire page that contains filament table
i have an existing panel for admin, and i am creating a livewire page that displays issues created for public. i am using the filament table inside.
9 replies
FFilament
Created by black ka1ser on 6/18/2023 in #❓┊help
displaying resource's index page based on user type
i have a resource called VideoResource. i have also created a custom page called Videos. how to make sure that upon login, when the user open the resource, they will be redirected to the custom page instead of the index of VideoResource?
6 replies
FFilament
Created by black ka1ser on 6/16/2023 in #❓┊help
access table repeater data
i have a table repeater and im trying to access the table repeater data. i have tried $data['nameOfRepeater'] but it says undefined array key.
11 replies
FFilament
Created by black ka1ser on 6/9/2023 in #❓┊help
deployment error
15 replies
FFilament
Created by black ka1ser on 5/15/2023 in #❓┊help
retrieve Radio value in custom page.
14 replies
FFilament
Created by black ka1ser on 5/14/2023 in #❓┊help
after() method of DetachAction is not working
for AttachAction it is working:
->headerActions([
Tables\Actions\AttachAction::make()
->label('Attach topic')
->after(
function (RelationManager $livewire, $data) {
// save all the questions of the attached topic into QuizQuestion

// 1. get all the questions of the topic, from Topicable
$questionIds = Topicable::where([
['topic_id', $data],
['topicable_type', 'Harishdurga\LaravelQuiz\Models\Question'],
])->pluck('topicable_id');

// 2. insert quizId and questionId into QuizQuestion
foreach ($questionIds as $questionId) {
QuizQuestion::create([
'quiz_id' => $livewire->ownerRecord->id,
'question_id' => $questionId,
]);
}
}
)
])
->headerActions([
Tables\Actions\AttachAction::make()
->label('Attach topic')
->after(
function (RelationManager $livewire, $data) {
// save all the questions of the attached topic into QuizQuestion

// 1. get all the questions of the topic, from Topicable
$questionIds = Topicable::where([
['topic_id', $data],
['topicable_type', 'Harishdurga\LaravelQuiz\Models\Question'],
])->pluck('topicable_id');

// 2. insert quizId and questionId into QuizQuestion
foreach ($questionIds as $questionId) {
QuizQuestion::create([
'quiz_id' => $livewire->ownerRecord->id,
'question_id' => $questionId,
]);
}
}
)
])
2 replies
FFilament
Created by black ka1ser on 5/7/2023 in #❓┊help
Writing Software Design Description (SDD) for Filament-based systems
Hello, im currently taking a subject in uni where i need to create the srs (software requirement specification) and sdd (software design description). I plan to develop a filament-based system to cut off the development time. In the sdd, there are sections where we need to create a package diagram to illustrate the folders and its files. Usually for the subject the lecturer expect to see the usual folders - Model, Controllers, and views. How do i do this for filament-based systems? When i explained about the Filament Resource the lecturer said it is equivalent to view files. How do i illustrate the backend process for filament-based systems?
16 replies
FFilament
Created by black ka1ser on 4/11/2023 in #❓┊help
Fail to attach questions to quiz.
quiz_questions is a pivot table where it stores quiz_id and question_id. right now i have a QuestionRelationManager under the Quiz resource. Quiz.php
public function questions()
{
return $this->hasMany(config('laravel-quiz.models.quiz_question'));
}
public function questions()
{
return $this->hasMany(config('laravel-quiz.models.quiz_question'));
}
Question.php
public function quiz_questions()
{
return $this->hasMany(config('laravel-quiz.models.quiz_question'));
}
public function quiz_questions()
{
return $this->hasMany(config('laravel-quiz.models.quiz_question'));
}
QuizQuestion.php
public function question()
{
return $this->belongsTo(config('laravel-quiz.models.question'));
}
public function question()
{
return $this->belongsTo(config('laravel-quiz.models.question'));
}
QuestionsRelationManager.php
protected static string $relationship = 'questions';

Tables\Actions\AttachAction::make()->form(fn (AttachAction $action): array => [
Forms\Components\Select::make('question_id')
->relationship('question', 'name')
->required(),
]),
protected static string $relationship = 'questions';

Tables\Actions\AttachAction::make()->form(fn (AttachAction $action): array => [
Forms\Components\Select::make('question_id')
->relationship('question', 'name')
->required(),
]),
It does shows the questions, however i cant attach it. The error is

Call to undefined method Illuminate\Database\Eloquent\Relations\HasMany::getQualifiedRelatedKeyName()

Call to undefined method Illuminate\Database\Eloquent\Relations\HasMany::getQualifiedRelatedKeyName()
7 replies
FFilament
Created by black ka1ser on 3/19/2023 in #❓┊help
Cannot create new Staff for StaffResource.
8 replies
FFilament
Created by black ka1ser on 3/16/2023 in #❓┊help
Index page not showing the create button for the resource
Installed filament for a friend. Create button didnt show up on the index page. Same goes to edit and delete button.
20 replies