Shadow-Here


Server : Apache
System : Linux methusalix2 3.16.0-11-amd64 #1 SMP Debian 3.16.84-1 (2020-06-09) x86_64
User : hios ( 1437)
PHP Version : 5.6.40-0+deb8u12
Disable Function : proc_close,proc_open,dl,shell_exec,passthru
Directory :  /home/priorityservice-dev.1697609569/laravel/routes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :
Current File : /home/priorityservice-dev.1697609569/laravel/routes/web.php
<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/

use GuzzleHttp\Client;

Route::get('/test', function() {
    $client = new Client([
        'base_uri' => 'http://webasto01.bcomone.nl/services/' . //priorityservicev1.asmx/'
        'lmsv1.asmx/'
    ]);
    $res = $client->request('POST', 'GetAccountGroups', [
        /*'form_params' => [
            'emailAddress' => $request->username,
            'password' => $request->password
        ]*/
    ]);

    if ($res->getStatusCode() !== 200) {
   //     return Redirect::back()->withInput()->withErrors(['msg' => trans('login.error-general')]);
    }


    // $res->getBody();
    return $res->getBody();
});


/**
 * Grab locale url segment
 * @var string
 */
$segment = Request::segment(1);

/**
 * If language is available in app-settings, set to active.
 * otherwise check if is
 */
if (in_array($segment, Config::get('app.available_locales'))) {

    /**
     * Set locale from the segment in the url
     */
    App::setLocale($segment);

    /**
     * Group binding all sites to prefixed locale segment
     */
    Route::group(['prefix' => $segment], function () {

        Route::get('/login', 'AuthController@login')->name('login');

        Route::get('/logout', 'AuthController@logout')->name('logout');

        Route::post('/login', 'AuthController@validateLogin');

        Route::group(['middleware' => 'login'], function () {

            Route::get('/', function () {

                $products = [
                    0 => "Pordoi 2000",
                    1 => "Pordoi 2000 Standby",
                    2 => "Pordoi 3000",
                    3 => "Pordoi 3000 Standby",
                    4 => "Pordoi 4000",
                    5 => "Pordoi 4000 Standby",
                    6 => "Frigo Top 10",
                    7 => "Frigo Top 25",
                    8 => "Frigo Top 35",
                    9 => "Frigo Top 35MT",
                    10 => "Frigo Top 40",
                    11 => "Frigo Top 50",
                    12 => "Frigo Top 60",
                    13 => "Air Top",
                ];

                $refrigerantTypes = [
                    0 => "R134A",
                    1 => "R404A",
                    2 => "R452A",
                ];

                $contractTypes = [
                    0 => "Standard",
                    1 => "Comfort",
                    2 => "Premium"
                ];

                $contractDurations = [
                    2, 3, 4, 5
                ];

                $plannedHours = [
                    1000, 1500, 2000, 2500
                ];

                $serviceRegions = [
                    0 => trans('general.national'),
                    1 => trans('general.at-b-ch')
                ];

                $vehicleQuantities = [
                    0 => "< 5",
                    1 => "> 5",
                    2 => "> 10",
                    3 => "> 25",
                    4 => "> 50"
                ];

                return view('priorityform', [
                    'products' => $products,
                    'refrigerantTypes' => $refrigerantTypes,
                    'contractTypes' => $contractTypes,
                    'contractDurations' => $contractDurations,
                    'plannedHours' => $plannedHours,
                    'serviceRegions' => $serviceRegions,
                    'vehicleQuantities' => $vehicleQuantities
                ]);
            })->name('priority');

        });

      /*  Route::get('/', function () {

            return view('registrationform', [
                'questions' => App\Models\Country::getDataByLocale(App::getLocale())->questions,
                'packages' => App\Models\Country::getDataByLocale(App::getLocale())->packages,
                'country' => App\Models\Country::getDataByLocale(App::getLocale()),
            ]);
        }); */

        Route::get('/tokenAccess/{guid}', function ($guid) {

            try {
                return view('registrationform', [
                    'questions' => App\Models\Country::getDataByLocale(App::getLocale())->questions,
                    'packages' => App\Models\Country::getDataByLocale(App::getLocale())->packages,
                    'country' => App\Models\Country::getDataByLocale(App::getLocale()),
                    'token' => App\Models\RegistrationToken::findByGuid($guid)
                ]);
            } catch (Exception $e) {
                return view('tokenNotFound');
            }

        });

        Route::get('/success', function () {

            return view('registrationSuccess', [
                "logout" => route('logout'),
                "priority" => route('priority')
            ]);
        });

        Route::group(['prefix' => 'ajax', 'middleware' => ['ajax']], function () {

            /**
             * Retrieve the registration from database by getting the id
             */
            Route::get('/formhelper/getRegistration/{type}/{registration}', 'AjaxController@getRegistration');
            Route::get('/formhelper/getCompanyValues/{company}', function ($company) {
                $companies = [
                    0 => [
                        "CrCountryID" => "",
                        "CrUserID" => "",
                        "CrCompanyname" => "",
                        "CrCountry" => "",
                        "CrEmailaddress" => "",
                        "CrFirstName" => "",
                        "CrLastName" => ""
                    ],
                    1 => [
                        "CrCountryID" => "",
                        "CrUserID" => "",
                        "CrCompanyname" => "Webasto",
                        "CrCountry" => "Deutschland",
                        "CrEmailaddress" => "Thorsten.Froboese@webasto.com",
                        "CrFirstName" => "Thorsten",
                        "CrLastName" => "Froboese"
                    ],
                    2 => [
                        "CrCountryID" => "",
                        "CrUserID" => "",
                        "CrCompanyname" => "Webasto",
                        "CrCountry" => "Nederland",
                         "CrEmailaddress" => "Michael.Geertsema@webasto.com",
                        "CrFirstName" => "Michael",
                        "CrLastName" => "Geertsema"
                    ],
                    3 => [
                        "CrCountryID" => "",
                        "CrUserID" => "",
                        "CrCompanyname" => "Webasto",
                        "CrCountry" => "United Kingdom",
                        "CrEmailaddress" => "Pete.Anderson@webasto.com",
                        "CrFirstName" => "Pete",
                        "CrLastName" => "Anderson"
                    ],
                    4 => [
                        "CrCountryID" => "",
                        "CrUserID" => "",
                        "CrCompanyname" => "Webasto",
                        "CrCountry" => "Italia",
                        "CrEmailaddress" => "Luigi.Lanfranco@webasto.com",
                        "CrFirstName" => "Luigi",
                        "CrLastName" => "Lanfranco"
                    ],
                    5 => [
                        "CrCountryID" => "",
                        "CrUserID" => "",
                        "CrCompanyname" => "Webasto",
                        "CrCountry" => "España",
                        "CrEmailaddress" => "Javier.Mateos@webasto.com",
                        "CrFirstName" => "Javier",
                        "CrLastName" => "Mateos"
                    ],
                    6 => [

                        "CrCountryID" => "",
                        "CrUserID" => "",
                        "CrCompanyname" => "Webasto",
                        "CrCountry" => "France",
                        "CrEmailaddress" => "Héloïse.Mollé@webasto.com",
                        "CrFirstName" => "Héloïse",
                        "CrLastName" => "Mollé"
                    ]
                ];

                return $companies[$company];
            });

            /**
             * post the first step form to controller endpoint
             */
            Route::post('/formhelper/submitCompanyInformation', 'AjaxController@submitCompanyInformation');
            Route::post('/formhelper/submitCustomerInformation', 'AjaxController@submitCustomerInformation');
            Route::post('/formhelper/submitVehicleInformation', 'AjaxController@submitVehicleInformation');
            Route::post('/formhelper/submitProductInformation', 'AjaxController@submitProductInformation');
            Route::post('/formhelper/submitRegistrationInformation', 'AjaxController@submitRegistrationInformation');
            Route::post('/formhelper/submitContractInformation', 'AjaxController@submitContractInformation');
            Route::post('/formhelper/submitRemarkInformation', 'AjaxController@submitRemarkInformation');
        });

    });

} else if ($segment == NULL) {
    App::setLocale('en');

    Route::get('/', function () {
        return view('languageOverview', [
            'countries' => App\Models\Country::getEnabledCountries()
        ]);
    });
}

Samx