<?php

namespace App\Http\Controllers;

use App\Models\Parents;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class CommonController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    public function login(Request $request) {
        $user = Parents::Where('email',$request->email)
        ->Where('password',$request->password)->first();
        return response()->json( ['user'=> $user],200 );
    }

}
