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');
投递是什么意思 | 男性霉毒是什么症状 | 住院带什么必备物品 | 脑子瓦特了什么意思 | 列文虎克发现了什么 |
客之痣是什么意思 | 一暴十寒什么意思 | 小腿肌肉抽筋是什么原因引起的 | 彼岸花是什么花 | 水杉是什么植物 |
家母是什么意思 | 身上皮肤痒是什么原因 | 宝宝不爱吃饭是什么原因 | 隔三差五是什么意思 | 维生素d是什么东西 |
水珠像什么 | 胃炎吃什么好 | 960万平方千米是指我国的什么 | 格格不入是什么意思 | 吃什么可以通便 |
理性什么意思hcv8jop7ns7r.cn | 什么是纳米hcv7jop9ns6r.cn | 前列腺肥大有什么症状hcv8jop3ns6r.cn | 女性支原体阳性是什么意思hcv8jop4ns1r.cn | 肚脐眼大代表什么hcv7jop7ns0r.cn |
什么的河水hcv8jop7ns9r.cn | 什么时候夏至hcv8jop3ns7r.cn | 麻是什么植物hcv8jop1ns4r.cn | 宫颈糜烂是什么gysmod.com | 干什么最赚钱hcv8jop1ns2r.cn |
小虾吃什么食物hcv9jop5ns5r.cn | 青龙是什么hcv7jop9ns7r.cn | 左肾囊性灶是什么意思hcv9jop1ns9r.cn | 熙字五行属什么hcv7jop4ns7r.cn | 舌战群儒是什么意思hcv9jop7ns9r.cn |
文王卦是什么意思hcv9jop2ns4r.cn | 假性宫缩是什么感觉inbungee.com | 有齿痕吃什么药hcv7jop6ns7r.cn | 治妇科炎症用什么药好hcv9jop2ns1r.cn | 什么情况需要打狂犬疫苗hcv8jop3ns3r.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