Student model - It has many fees
class student extends Model{
public function fees($round){
return $this->hasMany(fee::class)->where('payment_round','=',$round);
}
}
Fee.blade.php
@foreach($student->fees("parameter") as $fee)
@endforeach
How I can pass a parameter to $student->fees("parameter")
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire