<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Achievement;
use App\Models\Portofolio;
use App\Models\Testimoni;
use App\Models\Pesan;
use App\Models\Skill;
use App\Models\Experience;
use App\Models\Education;
use App\Models\Blog;
use Session;

class Deletecontroller extends Controller
{
    //
    public function achievement(Request $request){
        $id = $request->id;
        $data = Achievement::find($id);
        $data->delete();
        return response()->json(['text' => 'Data Berhasil Dihapus'], 200);
    }
    public function portfolio(Request $request){
        $id = $request->id;
        $data = Portofolio::find($id);
        $data->delete();
        return response()->json(['text' => 'Data Berhasil Dihapus'], 200);
    }
    public function testimoni(Request $request){
        $id = $request->id;
        $data = Testimoni::find($id);
        $data->delete();
        return response()->json(['text' => 'Data Berhasil Dihapus'], 200);
    }
    public function pesan(Request $request){
        $id = $request->id;
        $data = Pesan::find($id);
        $data->delete();
        return response()->json(['text' => 'Data Berhasil Dihapus'], 200);
    }
    public function skill(Request $request){
        $id = $request->id;
        $data = Skill::find($id);
        $data->delete();
        return response()->json(['text' => 'Data Berhasil Dihapus'], 200);
    }
    public function experience(Request $request){
        $id = $request->id;
        $data = Experience::find($id);
        $data->delete();
        return response()->json(['text' => 'Data Berhasil Dihapus'], 200);
    }
    public function education(Request $request){
        $id = $request->id;
        $data = Education::find($id);
        $data->delete();
        return response()->json(['text' => 'Data Berhasil Dihapus'], 200);
    }
    public function blog(Request $request){
        $id = $request->id;
        $data = Blog::find($id);
        $data->delete();
        return response()->json(['text' => 'Data Berhasil Dihapus'], 200);
    }
}
