skpi4u
Relationship Issue
@pboivin
Yes manifest table contains collection_id and sub_collection_id and sub_collections table contains collection_id every thing work perfect but the collection_id is not updated in sub_collections table this is code Forms\Components\Group::make([ TextInput::make('collection')->required(), ])->relationship('collections')->columnSpan('full'), Forms\Components\Group::make([ TextInput::make('sub_collection')->required(), ])->relationship('subCollections') ->columnSpan('full'),
Yes manifest table contains collection_id and sub_collection_id and sub_collections table contains collection_id every thing work perfect but the collection_id is not updated in sub_collections table this is code Forms\Components\Group::make([ TextInput::make('collection')->required(), ])->relationship('collections')->columnSpan('full'), Forms\Components\Group::make([ TextInput::make('sub_collection')->required(), ])->relationship('subCollections') ->columnSpan('full'),
12 replies
Sum of fee column in table footer
the list resource
<?php
namespace App\Filament\Resources\StudentResource\Pages;
use App\Filament\Resources\StudentResource;
use Filament\Pages\Actions;
use Filament\Resources\Pages\ListRecords;
use Filament\Tables\Filters\Layout;
use Closure;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
use App\Models\Student;
use App\Models\StudentCourse;
use Illuminate\Contracts\View\View;
class ListStudents extends ListRecords
{
protected static string $resource = StudentResource::class;
protected function getActions(): array
{
return [
Actions\CreateAction::make(),
];
}
/protected function getTableFiltersLayout(): ?string
{
return Layout::AboveContent;
}/
protected function getTableQuery(): Builder { return Student::query()->where('status', '=', 1); }
public array $data_list= [ 'calc_columns' => [ 'student_course.admission_fee', 'student_course.fee', 'student_course.advance', ], ]; protected function getTableContentFooter(): ?View { return view('tables.footer.student-footer', $this->data_list); } }
protected function getTableQuery(): Builder { return Student::query()->where('status', '=', 1); }
public array $data_list= [ 'calc_columns' => [ 'student_course.admission_fee', 'student_course.fee', 'student_course.advance', ], ]; protected function getTableContentFooter(): ?View { return view('tables.footer.student-footer', $this->data_list); } }
9 replies