<?php

namespace App\Http\Controllers\Admin\Mansion;

use App\Http\Requests\Admin\Mansion\DeleteRequest;
use App\Models\Article;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class DeleteController extends Controller
{
    public function delete($id)
    {
        $article = Article::findOrFail($id);
        $article->delete();
        return 1;
    }

    public function deleteMulti(DeleteRequest $request) {
        $listArticle = $request->article_id;

        $listArticle = Article::whereIn("id", $listArticle);
        $listArticle->delete();
        return 1;
    }
}

