<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/


Route::get('/','WelcomeController@index');

Route::get('home',['middleware' => 'auth', 'uses' => 'HomeController@index']);

Route::controllers(['auth' => 'Auth\AuthController','password' => 'Auth\PasswordController']);

//Route::post('market_place_report','WelcomeController@submit_market_place_data');

//Route::get('reports','ReportController@get_reports');

//Route::post('reports','ReportController@get_reports');

//Route::get('show_reports','ReportController@show_reports');



Route::post('market_place_report',['middleware' => 'auth', 'uses' => 'WelcomeController@submit_market_place_data']);

Route::get('reports',['middleware' => 'auth', 'uses' => 'ReportController@get_reports']);

Route::post('reports',['middleware' => 'auth', 'uses' => 'ReportController@get_reports']);

Route::get('show_reports',['middleware' => 'auth', 'uses' => 'ReportController@show_reports']);

Route::get('reports/{report_id}',['middleware' => 'auth', 'uses' => 'ReportController@edit']);

Route::post('reports/update',['middleware' => 'auth', 'uses' => 'ReportController@update']);

Route::get('report_delete/{report_id}',['middleware' => 'auth', 'uses' => 'ReportController@destroy']);

Route::get('refund',['middleware' => 'auth', 'as' => 'refund','uses' => 'ReportController@refund_display']);

Route::post('refund',['middleware' => 'auth', 'uses' => 'ReportController@refund']);



//Market Place routes

Route::get('market_places',['middleware' => 'auth', 'uses' => 'MarketplaceController@index']);

Route::get('add_market_place',['middleware' => 'auth', 'uses' => 'MarketplaceController@create']);

Route::post('save_market_place',['middleware' => 'auth', 'uses' => 'MarketplaceController@store']);

Route::get('market_places/{id}',['middleware' => 'auth', 'uses' => 'MarketplaceController@edit']);

Route::post('market_place/update',['middleware' => 'auth', 'uses' => 'MarketplaceController@update']);



//Route::get('market_places','MarketplaceController@index');

//Route::get('add_market_place','MarketplaceController@create');

//Route::post('save_market_place','MarketplaceController@store');

//Route::get('market_places/{id}','MarketplaceController@edit');

//Route::post('market_place/update','MarketplaceController@update');


//Source routes
//Route::get('sources','SourceController@index');

Route::get('sources',['middleware' => 'auth', 'uses' => 'SourceController@index']);

Route::get('add_sources',['middleware' => 'auth', 'uses' => 'SourceController@create']);

Route::post('add_new_sources',['middleware' => 'auth', 'uses' => 'SourceController@store']);

Route::get('sources/{id}',['middleware' => 'auth', 'uses' => 'SourceController@edit']);

Route::post('sources/update',['middleware' => 'auth', 'uses' => 'SourceController@update']);


//Route::get('add_sources','SourceController@create');

//Route::post('add_new_sources','SourceController@store');

//Route::get('sources/{id}','SourceController@edit');

//Route::post('sources/update','SourceController@update');

//Route::post('auth/register','SourceController@my_function');