Comments & Discussion
MM
i think this didn't work with me: in my case
My $table resource:
Tables\Columns\TextColumn::make('total_shipments')->counts('shipment')
Shipments Model:
public function company()
{
return $this->belongsTo(Company::class);
}
Company Model:
public function shipment()
{
return $this->hasMany(Shipment::class);
}
shipment Database schema:
Schema::create('shipments', function (Blueprint $table) {
$table->id();
$table->foreignId('vehicle_id')->constrained('vehicles');
$table->foreignId('driver_id')->constrained('drivers');
$table->foreignId('customer_id')->constrained('customers');
$table->foreignId('company_id')->constrained('companies');
$table->string('shipment_number')->unique()->nullable();
$table->string('status');
$table->string('from');
$table->string('to');
$table->text('description')->nullable();
$table->date('shipment_date');
$table->timestamps();
});
and returning empty values
user table have role column, role is user and admin, login user then redirect admin/dashboard, and login user redirect user/dashboard, it's posible?
In Filament 2, it is solved this way
In Filament 3, it is solved with multiple panels, this way: course tutorial or YouTube video