ok i want to create route like showing data in another page like this
my route like this
Route::get('/uraian/{id}', [PengadaanController::class, 'uraian'])->name('uraian');
i can access this and its normal . now its my livewire function
<?php
namespace App\Http\Livewire;
use Livewire\WithPagination;
use App\Models\Kegi;
use App\Models\Uraian;
use Livewire\Component;
class UraianLw extends Component
{
use WithPagination;
public $uraianid ,$kegiatan_id ,$kode_rekening ,$uraian ,$anggaran ;
public $isOpen = 0;
public $search = '';
public function render($id)
{
$kegiatan = Kegi::findOrFail($id);
$newid = $kegiatan->id ;
return view('livewire.uraian-lw',[
'uraian' => Uraian::where('id' ,$newid)->where('uraian', 'like', '%'.$this->search.'%')->paginate(10)
]);
}
}
and have error
Unable to resolve dependency [Parameter #0 [ $id ]] in class App\Http\Livewire\Uraian
i think i’m wrong , how i can solved this ?