<?php

namespace App\Http\Controllers\Admin\Shop;

use Illuminate\Http\Request;

use App\Repositories\Shop\ArticleNatures;
use App\Datatables\Shop\ArticleNaturesDataTable;

class ArticleNatureController extends Controller
{
    public function index(ArticleNaturesDataTable $dataTable)
    {
        return $dataTable->render('Admin.Shop.ArticleNatures.list');
    }

    public function create()
    {
        return view('Admin.Shop.ArticleNatures.create');
    }

    public function store(Request $request)
    {
        $ret = ArticleNatures::store($request->all());
        return redirect()->route('Admin.Shop.ArticleNatures.index');
    }

    public function show($id)
    {
        $data['article_nature'] = ArticleNatures::get($id);
        return view('Admin.Shop.ArticleNatures.view', $data);
    }

    public function edit($id)
    {
        $data['article_nature'] = ArticleNatures::get($id);
        return view('Admin.Shop.ArticleNatures.edit', $data);
    }

    public function destroy($id)
    {
        return ArticleNatures::destroy($id);
    }
}
