Commit c42cc4a3 by Siti Aisah

fix hapus peserta

parent fae4ccd2
......@@ -6,6 +6,7 @@
use Illuminate\Support\Facades\Hash;
use App\Http\Controllers\Controller;
use App\Models\Kegiatan;
use App\Models\KegiatanPeserta;
use App\Models\Konferensi;
use App\Models\Registrasi;
use App\Models\User;
......@@ -302,7 +303,9 @@ public function index_peserta(){
public function delete_peserta($id) {
DB::beginTransaction();
try{
Registrasi::find($id)->delete();
KegiatanPeserta::where('id_registrasi',$id)->delete();
Registrasi::where('id',$id)->delete();
DB::commit();
return redirect()->back()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment