<?php

use Illuminate\Http\Client\Request;
use Illuminate\Support\Facades\Route;

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

################
Route::get('/hello', function(){
    return response('<h1>Hello World... Sheldon!</h1>')
    ->header('Content-type', 'text/plain');
});

Route::get('/posts/{id}', function($id){
    return response('Post ' . $id);;
})->where('id', '[0-9]+');

Route::get('/search/{id}', function(Request $request){
    dd($request);
});