<?php

use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;

Route::get('many-to-many', 'ManyToManyController@manyToMany');
Route::get('many-to-one', 'ManyToOneController@manyToOne');
Route::get('one-to-many', 'OneToManyController@oneToMany');
//Route::get('one-to-many', 'oneToManyController@oneToManyLoteProcesso');
Route::get('one-to-one', 'OneToOneController@oneToOne');
Route::any('agendamentos/search', 'AgendamentoController@search')->name('agendamentos.search')->middleware('auth');//->middleware('auth');
Route::any('titulos/search', 'TituloController@search')->name('titulos.search')->middleware('auth');//->middleware('auth');
Route::resource('titulos', 'TituloController')->middleware('auth');
Route::resource('agendamentos', 'AgendamentoController')->middleware('auth');
Route::any('lotes/search', 'LoteController@search')->name('lotes.search');
Route::resource('lotes', 'LoteController')->middleware('auth');
Route::resource('municipios', 'MunicipioController')->middleware('auth');
Route::any('municipios/search', 'MunicipioController@search')->name('municipios.search')->middleware('auth');//->middleware('auth');
Route::resource('glebas', 'GlebaController')->middleware('auth');
Route::any('glebas/search', 'GlebaController@search')->name('glebas.search')->middleware('auth');//->middleware('auth');

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');


/* Route::put('titulos/{id}', 'TituloController@destroy')->name('titulos.destroy'); //Editar um registro - put
Route::put('titulos/{id}', 'TituloController@update')->name('titulos.update'); //Editar um registro - put
Route::get('titulos/edit', 'TituloController@edit')->name('titulos.edit'); //Pegar um registro - get
Route::get('titulos/{id}/edit', 'TituloController@edit')->name('titulos.edit');
Route::get('titulos/create', 'TituloController@create')->name('titulos.create');
Route::get('titulos/{id}', 'TituloController@show')->name('titulos.show');
Route::get('titulos', 'TituloController@index')->name('titulos.index');
Route::post('titulos', 'TituloController@store')->name('titulos.store'); //Cadastrar um registro - post 
*/


// Route::get('/login', function () {
//     return view('login');
// })->name('login');


Route::get('/', function () {
    return view('welcome');
});


