<?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(),'namespace'=>'Lamis'],function(){
    Route::group(['middleware'=>['guests']] , function(){
    Route::get('/regist','AuthController@regist');
    Route::post('/regist','AuthController@registting');
    Route::get('/login','AuthController@login');
    Route::post('/login','AuthController@check');
    Route::get('/pay/{data}','AuthController@pay');
   
});
    
     Route::post('/subscribe','HomeController@subscribe');
     Route::post('/contactus','HomeController@contactus');
     Route::get('/contacts','HomeController@contacts');
     Route::get('/privacy','HomeController@privacy');
     Route::get('/conditions','HomeController@conditions');
    Route::get('/','HomeController@index');
    
    Route::get('member/logout','AuthController@logout');
    
    Route::resource('new','NewsController');
    Route::resource('utility','UtilitiesController');
    Route::resource('package','PackageController');
    Route::get('about','HomeController@about');
    Route::get('/levels','HomeController@levels');
    
    Route::group(['middleware'=>['AuthMember']] , function(){
    Route::get('continue','AuthController@Second_auth');
        Route::get('pay','AuthController@pay');
        Route::post('paying','AuthController@paying');
        Route::get('paid','AuthController@paid');
    Route::post('continueauth','AuthController@continueauth');
    Route::get('member','ProfileController@index');
    Route::get('profile','ProfileController@profile');
    Route::get('edit','ProfileController@edit');
    Route::post('update','ProfileController@update');
    Route::get('edit/project/{id}','ProfileController@editproject');
    Route::post('update/project/{id}','ProfileController@updateproject');
    Route::post('active','ProfileController@active');
    Route::get('add/project','ProfileController@add_project');
    Route::post('add/project','ProfileController@store_project');
    Route::resource('project','ProjectController');
});
Route::group(['middleware'=>['AuthMember','paidMember']] , function(){
   
    Route::resource('step','StepController');
    Route::post('form','FormController@store');
    Route::get('final/save/{id}','PrintController@show');
    Route::get('final/saving/{id}','PrintController@save');
    Route::get('final/print/{id}','PrintController@print');
});

});