<?php

namespace App\Http\Controllers;

use App\Models\DeviceType;
use Brian2694\Toastr\Facades\Toastr;
use Illuminate\Http\Request;

class DeviceTypeController extends Controller
{

    public function index()
    {
        //
    }


    public function create()
    {
        //
    }


    public function store(Request $request)
    {
        $this->validate($request, [
            'name' => 'required',
        ]);

        $device = new DeviceType();
        $device->name = $request->name;
        $device->save();

        Toastr::success('Information inserted Successfully!', '', ["closeButton" => "true", "progressBar" => "true"]);
        return redirect()->back();
    }


    public function show($id)
    {
        //
    }


    public function edit($id)
    {
        //
    }


    public function update(Request $request, $id)
    {
        //
    }


    public function destroy($id)
    {
        //
    }
}
