<?php
/*
|--------------------------------------------------------------------------
| 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::get('/', 'PagesController@home');
Route::get('/contact', 'PagesController@contact');
Route::get('/dashboard', 'PagesController@dashboard');
Route::post('/addEnquiry', 'PagesController@addEnquiry')->name('addEnquiry');
Route::post('/getGeoCode', 'PagesController@getGeoCode')->name('getGeoCode');
Route::post('/getChart1', 'PagesController@getChart1')->name('getChart1');
Route::post('/getPieChart', 'PagesController@getPieChart')->name('getPieChart');

// Route::get('/', function () {
//     $tasks = [
//         'Go to the store',
//         'Go to the market',
//         'Go to work'
//     ];

//     return view('welcome',[
//         'tasks' => $tasks
//     ]);
// });

Auth::routes();

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



Route::group(['middleware' => 'auth'], function () {
	Route::resource('user', 'UserController', ['except' => ['show']]);
	Route::get('clients', 'UserController@clients')->name('user.clients');
	Route::get('profile', ['as' => 'profile.edit', 'uses' => 'ProfileController@edit']);
	Route::put('profile', ['as' => 'profile.update', 'uses' => 'ProfileController@update']);
	Route::put('profile/password', ['as' => 'profile.password', 'uses' => 'ProfileController@password']);
});

