HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/demo.sports-crowd.com/database/seeds/ERPParamsSeeder.php
<?php

use App\Erp;
use App\ErpParameter;
use Illuminate\Database\Seeder;

class ERPParamsSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {

        $sap = Erp::updateOrCreate(
            ['name' => 'Sap'],
            [
                'name' => 'Sap',
                'class' => 'App\Http\Controllers\ERPSapController',
                'active' => false
            ]
        );

        ErpParameter::updateOrCreate(
            ['key' => 'url', 'erp_id' => $sap->id],
            [
                'key' => 'url',
                'value' => 'https://apiprbs.postobon.com/NALPVRPOPEDIPRBS/PedidosNAL/v1.0.0/RESTAdapter/v1/',
                'erp_id' => $sap->id
            ]
        );

        ErpParameter::updateOrCreate(
            ['key' => 'urlAuth', 'erp_id' => $sap->id],
            [
                'key' => 'urlAuth',
                'value' => 'https://login.microsoftonline.com/1be5ad33-84d3-42a0-a64a-1b673e4e9944/oauth2/v2.0/token',
                'erp_id' => $sap->id
            ]
        );

        ErpParameter::updateOrCreate(
            ['key' => 'client_secret', 'erp_id' => $sap->id],
            ['key' => 'client_secret','value' => 'ti58Q~DG6vUS7KMqOql5edMfl8sqzzB5lBtKQatq','erp_id' => $sap->id]
        );

        ErpParameter::updateOrCreate(
            ['key' => 'client_id', 'erp_id' => $sap->id],
            ['key' => 'client_id','value' => 'be3ddf00-de1e-40df-a1bc-8ea7088fa508','erp_id' => $sap->id]
        );

        ErpParameter::updateOrCreate(
            ['key' => 'scope', 'erp_id' => $sap->id],
            ['key' => 'scope','value' => 'api://be3ddf00-de1e-40df-a1bc-8ea7088fa508/.default','erp_id' => $sap->id]
        );

        ErpParameter::updateOrCreate(
            ['key' => 'grant_type', 'erp_id' => $sap->id],
            ['key' => 'grant_type','value' => 'client_credentials','erp_id' => $sap->id]
        );

        ErpParameter::updateOrCreate(
            ['key' => 'subscription-Key', 'erp_id' => $sap->id],
            ['key' => 'subscription-Key','value' => 'c5fe5870c21e429486212a48c9415451','erp_id' => $sap->id]
        );

        ErpParameter::updateOrCreate(
            ['key' => 'create_rc', 'erp_id' => $sap->id],
            ['key' => 'create_rc','value' => false,'erp_id' => $sap->id]
        );

        ErpParameter::updateOrCreate(
            ['key' => 'create_bill', 'erp_id' => $sap->id],
            ['key' => 'create_bill','value' => false,'erp_id' => $sap->id]
        );

        ErpParameter::updateOrCreate(
            ['key' => 'min_price_to_sync', 'erp_id' => $sap->id],
            ['key' => 'min_price_to_sync','value' => 1,'erp_id' => $sap->id]
        );
    }
}