<?php

//use Illuminate\Support\Facades\Route;

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

Route::group(['prefix' => LaravelLocalization::setLocale()], function(){

	// Route::get('/', function () {
	//     // return redirect('/admin/login');
	// });
        Route::get('/test','PageController@test');

    Route::group(['middleware' => ['checkpublic', 'checkWebSiteEnabled', 'WebsiteVisitorCount'],'namespace' => 'Web' ], function () {
        Route::group(['middleware' => [ 'checkWebSiteEnabled', 'WebsiteVisitorCount']], function () {
        Route::get('/','HomeController@index');
        });
        Route::get('/services','ServiceController@index');
        Route::get('/policy','PageController@policy');
        Route::post('calcalories','FetchController@calcalories');
        Route::post('mealcalories','FetchController@mealcalories');
        
        Route::get('selectType/{data}','FetchController@selectType');
        Route::get('categorySelect/{data}','FetchController@categorySelect');
        Route::post('problemSelect','FetchController@problemSelect');
        
        Route::get('selectcat/{data}','FetchController@selectcat');
        Route::post('problemSelectData','FetchController@problemSelectData');
        Route::post('reserving','PageController@reserving');
        
        
        
        Route::get('/conditions','PageController@conditions');
        Route::get('/reservation','PageController@reservation');
        Route::get('/aboutus','PageController@about');
        Route::get('/contactus','PageController@contact');
        Route::post('/subscribe','PageController@subscribe');
        Route::post('/contacting','PageController@contacting');
        Route::get('package','PackageController@package');
        Route::get('packageStatus','PackageController@packageStatus');
        Route::get('packageStatusInvite','PackageController@packageStatusInvite');
        
        Route::get('stores','StoreController@stores');
        Route::get('search','StoreController@search');
        Route::get('stores/{id}','StoreController@store');
        Route::get('request','StoreController@request');
        Route::post('request','StoreController@requesting');
        
    });
    
});
    