رفتن به مطلب
انجمن پشتیبانی لاراول ایران

هاست لاراول با پشتیبانی 24 ساعته و امکانات کامل از مدیرهاست

payman

عدم نمایش اطلاعات بعد از ارسال به متد show , edit , delete

Recommended Posts

Route::prefix('Locomotive_repairs')->group(function (){
    Route::get('/',[\App\Http\Controllers\LocomotiveRepairController::class,'index'])->name('Locomotive_repairs');
    Route::post('/store',[\App\Http\Controllers\LocomotiveRepairController::class,'store'])->name('Locomotive_repairs.store');
    Route::get('/{repair}/edit',[\App\Http\Controllers\LocomotiveRepairController::class,'edit'])->name('Locomotive_repairs.edit');
    Route::get('/{repair}/destroy',[\App\Http\Controllers\LocomotiveRepairController::class,'destroy'])->name('Locomotive_repairs.publish');
    Route::put('/{repair}/update',[\App\Http\Controllers\LocomotiveRepairController::class,'update'])->name('Locomotive_repairs.update');
    Route::get('/{repair}/show',[\App\Http\Controllers\LocomotiveRepairController::class,'show'])->name('Locomotive_repairs.show');
    Route::get('/{repair}/print',[\App\Http\Controllers\LocomotiveRepairController::class,'print'])->name('Locomotive_repairs.print');
    Route::get('/search',[\App\Http\Controllers\LocomotiveRepairController::class,'search'])->name('Locomotive_repairs.search');
});

نحوه فراخوانی :
{{route('Locomotive_repairs.show',$repair->id)}}

 و محتوای کنترلر 
 /**
     * Display the specified resource.
     *
     * @param  \App\Models\Locomotive_repair  $locomotive_repair
     * @return \Illuminate\Http\Response
     */
    public function show(Locomotive_repair $locomotive_repair)
    {
       dd($locomotive_repair);
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Models\Locomotive_repair  $locomotive_repair
     * @return \Illuminate\Http\Response
     */
    public function edit(Locomotive_repair $locomotive_repair)
    {
       dd($locomotive_repair);
    }

/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Locomotive_repair  $locomotive_repair
     * @return \Illuminate\Http\Response
     */
    public function destroy(Locomotive_repair $locomotive_repair)
    {
        dd($locomotive_repair);
    }


و مقادیر dd()

^ App\Models\Locomotive_repair {#1467 
  #fillable: array:10 [▶]
  #connection: null
  #table: null
  #primaryKey: "id"
  #keyType: "int"
  +incrementing: true
  #with: []
  #withCount: []
  +preventsLazyLoading: false
  #perPage: 15
  +exists: false
  +wasRecentlyCreated: false
  #escapeWhenCastingToString: false
  #attributes: []
  #original: []
  #changes: []
  #casts: []
  #classCastCache: []
  #attributeCastCache: []
  #dates: []
  #dateFormat: null
  #appends: []
  #dispatchesEvents: []
  #observables: []
  #relations: []
  #touches: []
  +timestamps: true
  #hidden: []
  #visible: []
  #guarded: array:1 [▶]
}

گزینه 
#attributes: []
 خالی هست دلیلش رو نمی دونم ممنون راهنمایی کنید 

 

Share this post


Link to post
Share on other sites

هاست لاراول با پشتیبانی 24 ساعته و امکانات کامل از مدیرهاست

وارد این گفتگو شوید

میتوانید پیام خود را ارسال کنید و بعد ثبت نام نمایید. در صورتی که حساب کاربری دارید, هم اکنون وارد شوید و در این گفتگو شرکت کنید.

مهمان
پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  Only 75 emoji are allowed.

×   لینک شما به صورت اتوماتیک جایگذاری شد.   نمایش به عنوان یک لینک به جای

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • جدید...