I don't know why I'm not getting the value from the modal in my Laravel controller. Please check it for me.
However, I use the same code for other modes and controllers. It's working and returning the value from the property without any issues.
I'm using Laravel 8 and php 8.1;
Below is my code.
app\Http\Controllers\Admin\MpdController.php
public function edit(mpd $mpd) { dd($mpd); }
app\Models\admin\mpd.php
use App\Models\taxcategories; class mpd extends Model { use HasFactory; public $table = 'purchdata'; protected $primaryKey = 'sno'; protected $dates = [ 'created_at', 'updated_at', 'approved_at', ]; protected $fillable = [ 'sno', 'supplier', 'stockid', 'price', 'discount', 'disc_flag', 'tax_category', 'preferred', 'createby', 'modifiedby', 'approvedby', 'history', ]; /** * Get the tax_category that owns the maintainpurchasingdata * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function tax_category(): BelongsTo { return $this->belongsTo(taxcategories::class, 'tax_category', 'taxrate'); } }
routing\web.php
Route::resource('maintainpurchase', 'MpdController');
月经为什么是黑色的 | 贤者模式是什么意思 | 最聪明的狗是什么狗 | 传媒公司是干什么的 | 什么的月光 |
巨蟹座喜欢什么星座 | 纸醉金迷下一句是什么 | 红什么 | 丁丁历险记的狗是什么品种 | 济公属什么生肖的 |
查胆固醇挂什么科 | 71年属什么 | 心衰做什么检查能确诊 | 决明子配什么喝最减肥 | 碳酸氢钠是什么东西 |
ryan是什么意思 | 木樨是什么意思 | 白带正常是什么颜色 | 道地药材是什么意思 | 男人遗精是什么原因 |
吃什么对心脏有好处hcv9jop1ns5r.cn | 1.27是什么星座hcv9jop4ns9r.cn | 牛犇是什么意思hcv8jop3ns2r.cn | 龙井是什么茶hcv8jop2ns8r.cn | 嘴巴淡而无味是什么原因hcv9jop4ns8r.cn |
戒定真香是什么意思hcv9jop5ns2r.cn | 口腔溃疡吃什么药好的快hcv9jop0ns1r.cn | 木薯是什么东西beikeqingting.com | 性疾病都有什么症状jasonfriends.com | 女性肛裂要抹什么药好hcv9jop4ns7r.cn |
李世民的字是什么hcv7jop9ns9r.cn | 双龙是什么意思hcv9jop7ns9r.cn | 目赤什么意思hcv9jop3ns6r.cn | 双相是什么hcv8jop0ns8r.cn | 家里有小蜘蛛预示什么hcv9jop3ns0r.cn |
身首异处是什么意思bysq.com | 阴囊湿疹挂什么科hcv8jop8ns9r.cn | 安徽菜属于什么菜系hcv8jop8ns1r.cn | 宫颈肥大需要注意什么hcv7jop9ns7r.cn | 性生活出血是什么原因hcv7jop7ns2r.cn |
Route model binding will automatically determine the variable name based on the name in front of the variable name
For example:
Route::resource('images', 'ImageController')
Expect
Image $image
to exist in the controller.Use
php artisan route:list
and find the value between brackets and changeto
Or use the parameter function on the routing resource definition to modify the parameter name