<?php

use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Artisan;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web router for your application. These
| router are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return ['Laravel' => app()->version()];
//});

Route::get('/{any}', function () {
    return response()->json(['status' => 'success', 'message' => 'Welcome to presidential management app'], 200);
})->where('any', '.*');

Route::get('/clear-cache-temp', function () {
    Artisan::call('optimize:clear');
    return 'Cache Laravel vide';
});

require __DIR__.'/auth.php';
