<?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(),
       'middleware' => [ 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath' ]
    
    ],function() {

        Route::get('/forgot_password','AuthentificationController@pass')->name('forgot_password');

        Route::post('/forgot_passwordPost','AuthentificationController@verifier')->name('forgot_passwordPost');

        Route::get('/reset/{id}','AuthentificationController@reset')->name('reset');

        Route::post('/resetPost/{id}','AuthentificationController@resetpass')->name('resetPost');

        Route::get('/','AuthentificationController@accueil')->name('accueil');

        Route::get('/admin','AuthentificationController@login')->name('Login');

        Route::post('/Deconnexion','AuthentificationController@deconnecter')->name('Deconnexion');

        Route::post('/Deconnexion_client','AuthentificationController@deconnecterclt')->name('Deconnexion_client');

        Route::post('/loginPost','AuthentificationController@Connecter')->name('loginPost');

        Route::get('/accueil_admin','AuthentificationController@accueil_admin')->name('Accueil_admin');

        Route::get('/login_client/{id}','AuthentificationController@logclient')->name('login_client');

        Route::get('/register','AuthentificationController@reg')->name('register');
        
        Route::get('/confirmation-de-compte/{id}','AuthentificationController@confirm')->name('confirmation-de-compte');
        
        Route::post('/confirmation-de-compte-post','AuthentificationController@confirmpost')->name('confirmation-de-compte-post');
        
        Route::post('/SupprimerprouPost','AuthentificationController@supprimer')->name('SupprimerprouPost');
        
        Route::post('/registerPost','AuthentificationController@enregistrerclient')->name('registerPost');

        Route::post('/loginclientPost','AuthentificationController@Connecterclient')->name('loginclientPost');

        Route::get('/client','AuthentificationController@loginclient')->name('client');

        Route::post('/clientPost','AuthentificationController@Conclient')->name('clientPost');


        Route::get('/liste_commande','AuthentificationController@liste_cmde')->name('liste_commande');

        Route::get('/liste_transaction','AuthentificationController@liste_tran')->name('liste_transaction');

        Route::get('/liste_client','AuthentificationController@liste_cli')->name('liste_client');

        Route::get('/detail_commande/{id}','AuthentificationController@det')->name('detail_commande');

        Route::get('/Commande/{id}','AuthentificationController@Voirtraitement')->name('Commande');

        Route::post('/traitcommandePost','PaymentController@traitecmde')->name('traitcommandePost');

        Route::get('/mes-publications','AuthentificationController@mespub')->name('mes-publications');

        Route::get('/compte','AuthentificationController@moncompte')->name('compte');

        Route::get('/compte/tableau-de-bord','AuthentificationController@moncompte2')->name('tableau-de-bord');

        Route::get('/client_commande','AuthentificationController@clt_cmde')->name('client_commande');
		
        Route::get('/paiement_commande_client','AuthentificationController@clt_paie')->name('paiement_commande_client');

        Route::get('/detail_commande_client/{id}','AuthentificationController@detclt')->name('detail_commande_client');

        Route::get('/facturation_commande/{id}','AuthentificationController@faccmde')->name('facturation_commande');

        Route::get('/detail_compte','AuthentificationController@detcpte')->name('detail_compte');

        Route::post('/savePost','AuthentificationController@somptesave')->name('savePost');

        Route::get('/contact-us','AuthentificationController@contact')->name('contact-us');

        Route::post('/contactPost','AuthentificationController@envoi')->name('contactPost');
		
		
		
				
		//GESTION DES PERMISSIONS

		Route::get('/parametre/permission/{id}','PermissionController@perm')->name('permission');

		Route::post('/permissionPost/{id}','PermissionController@enre')->name('permissionPost');

		Route::post('/modifpermissionPost/{id}','PermissionController@mod')->name('modifpermissionPost');

		Route::get('/parametre/permissions','PermissionController@permis')->name('permissions');

		Route::get('/parametre/modifier_permission/{id}','PermissionController@modif')->name('modification-permission');

		Route::get('/Permission/{id}','PermissionController@VoirSuppressionper')->name('Permission');

		Route::post('/Supprimerperpost','PermissionController@suppper')->name('Supprimerperpost');



        //GESTION DES INFORMATIONS 


        Route::get('/info/nouvel_info','InfoController@nouveau')->name('Nouvelle_information'); 

        Route::post('/nouvel_infoPost','InfoController@enregistrer')->name('nouvel_infoPost');

        Route::get('/info/liste','InfoController@liste')->name('Liste_information');

        Route::get('/info/modification/{id}','InfoController@modifier')->name('modification_info');

        Route::post('/modif_infoPost/{id}','InfoController@valider')->name('modif_infoPost');

        Route::get('/Informations/{id}','InfoController@VoirSuppression')->name('Informations');

        Route::post('/SupprimerinfoPost','InfoController@supprimer')->name('SupprimerinfoPost');



        //GESTION DES CATEGORIES 

        Route::get('/categorie/nouveau_categorie','CategorieController@nouveau')->name('Nouveau_categorie'); 

        Route::post('/nouveau_catPost','CategorieController@enregistrer')->name('nouveau_catPost');

        Route::get('/categorie/liste','CategorieController@liste')->name('Liste_categorie');

        Route::get('/categorie/modification/{id}','CategorieController@modifier')->name('modification_categorie');

        Route::post('/modif_catPost/{id}','CategorieController@valider')->name('modif_catPost');

        Route::get('/Categories/{id}','CategorieController@VoirSuppression')->name('Categories');

        Route::post('/SupprimercatPost','CategorieController@supprimer')->name('SupprimercatPost');


        //GESTION DES PRODUITS 

        Route::get('/produit/nouveau_produit','ProduitController@nouveau')->name('Nouveau_produit'); 

        Route::post('/nouveau_proPost','ProduitController@enregistrer')->name('nouveau_proPost');

        Route::get('/produit/liste','ProduitController@liste')->name('Liste_produit');

        Route::get('/produit/modification/{id}','ProduitController@modifier')->name('modification_produit');
		

        Route::post('/modif_proPost/{id}','ProduitController@valider')->name('modif_proPost');

        Route::get('/Produits/{id}','ProduitController@VoirSuppression')->name('Produits');

        Route::post('/SupprimerproPost','ProduitController@supprimer')->name('SupprimerproPost');

        Route::get('/nouveau_photo/{id}','ProduitController@ajouterphoto')->name('nouveau_photo');

        Route::post('/nouveau_photoPost/{id}','ProduitController@enregistrerphoto')->name('nouveau_photoPost');

        Route::get('/liste_photo/{id}','ProduitController@lphoto')->name('liste_photo');

        Route::get('/add_to_cart/{id}','ProduitController@add')->name('add_to_cart');

        Route::post('/addcartPost','ProduitController@ajouterpanier')->name('addcartPost');

        Route::get('/cart','ProduitController@listecart')->name('cart');
		
		 Route::get('/Lignecommande/{id}','ProduitController@VoirSupp')->name('Lignecommande');

        Route::post('/suppcartPost','ProduitController@suppcart')->name('suppcartPost');

        Route::post('/validercartPost','ProduitController@validercart')->name('validercartPost');

        Route::get('/boutique','ProduitController@boutique')->name('boutique');
		
        Route::post('/articles-par-categorie','ProduitController@boutique2')->name('articles-par-categorie');
		
        Route::get('/articles-par-categorie2/{id}','ProduitController@boutique3')->name('articles-par-categorie2');
       
        Route::post('/searchPost','ProduitController@search')->name('searchPost');
		
		
		
		
        //GESTION DES FOURNISSEURS 

        Route::get('/fournisseur/nouveau','FournisseurController@nouveau')->name('nouveau_fournisseur'); 

        Route::post('/nouveau_fouPost','FournisseurController@enregistrer')->name('nouveau_fouPost');

        Route::get('/fournisseur/liste','FournisseurController@liste')->name('liste_des_fournisseurs');

        Route::get('/fournisseur/modification/{id}','FournisseurController@modifier')->name('modification_fou');

        Route::post('/modif_fouPost/{id}','FournisseurController@valider')->name('modif_fouPost');

        Route::get('/Fou/{id}','FournisseurController@VoirSuppression')->name('Fou');

        Route::post('/SupprimerfouPost','FournisseurController@supprimer')->name('SupprimerfouPost');
		
		
		
		//GESTION DES PAIEMENTS 
		
		Route::get('/payment/choose_payment/{id}','PaymentController@choose')->name('choose_payment');
		
		Route::get('/payment/payment-stripe/{id}','PaymentController@pay')->name('payment-stripe');
		
		Route::post('/create-payment-intent','PaymentController@createPaymentIntent')->name('stripe.createIntent');

		
        Route::get('/payment/payment-paypal/{id}','PaymentController@paypal')->name('payment-paypal');
  
        Route::post('/paypal/store-transaction', 'PaymentController@storeTransaction')->name('paypal.storeTransaction');
		
		Route::get('/payment/virement-bancaire/{id}','PaymentController@vire')->name('virement-bancaire');

        Route::post('/virementPost', 'PaymentController@virbanc')->name('virementPost');



        Route::get('/payment/payment-zelle/{id}','PaymentController@zel')->name('payment-zelle');

        Route::post('/zellePost', 'PaymentController@zelpay')->name('zellePost');

        Route::get('/Paiement/{id}','PaymentController@Voirpaie')->name('Paiement');

        Route::get('/payment/payment-hors-ligne/{id}','PaymentController@horspaie')->name('payment-hors-ligne');

         Route::post('/horspaiePost','PaymentController@hpaie')->name('horspaiePost');
          
        Route::get('/merci/{id}','PaymentController@mer')->name('merci');
		
		
		

});