<?php

namespace App\Http\Controllers;

use App\Registry;
use App\RegistryModal;
use Illuminate\Http\Request;

class RegistryController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        return view('login');
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        $guardarRegistros = RegistryModal::create([
            'name'=>$request->name,
            'TypePet'=>$request->TypePet,
            'otro'=>$request->otro,
            'SexPet'=>$request->SexPet,
            'edadmascota'=>$request->edadmascota,
            'namepets'=>$request->namepets,
            'dom'=>$request->dom,
            'phone'=>$request->phone
            ]);
        $guardarRegistros->save();
         return redirect()->back()->with('success','se inserto correctamente');
    }

    /**
     * Display the specified resource.
     *
     * @param  \App\Registry  $registry
     * @return \Illuminate\Http\Response
     */
    public function show(Registry $registry)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Registry  $registry
     * @return \Illuminate\Http\Response
     */
    public function edit(Registry $registry)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Registry  $registry
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, Registry $registry)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  \App\Registry  $registry
     * @return \Illuminate\Http\Response
     */
    public function destroy(Registry $registry)
    {
        //
    }
}
