{"id":14974826,"url":"https://github.com/volldigital/laravel-navision","last_synced_at":"2025-06-20T02:38:12.371Z","repository":{"id":42349951,"uuid":"196983196","full_name":"volldigital/laravel-navision","owner":"volldigital","description":"Fetch any data from navision using ntlm","archived":false,"fork":false,"pushed_at":"2023-03-31T07:53:47.000Z","size":136,"stargazers_count":2,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T07:46:42.067Z","etag":null,"topics":["laravel","laravel-5-package","laravel-6-package","laravel-framework","laravel-navision","laravel-ntlm","laravel5","laravel6","microsoft","navision","ntlm","package","unitop"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/volldigital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-15T11:11:35.000Z","updated_at":"2023-03-31T07:51:50.000Z","dependencies_parsed_at":"2024-09-14T18:28:33.851Z","dependency_job_id":"57de14ff-8647-4d67-a3bd-ef8dd855eaa3","html_url":"https://github.com/volldigital/laravel-navision","commit_stats":{"total_commits":52,"total_committers":3,"mean_commits":"17.333333333333332","dds":0.4423076923076923,"last_synced_commit":"fcde37e540b3f9d7d8113e3c7f24635571908ab8"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/volldigital/laravel-navision","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volldigital%2Flaravel-navision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volldigital%2Flaravel-navision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volldigital%2Flaravel-navision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volldigital%2Flaravel-navision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/volldigital","download_url":"https://codeload.github.com/volldigital/laravel-navision/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volldigital%2Flaravel-navision/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260867909,"owners_count":23074915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","laravel-5-package","laravel-6-package","laravel-framework","laravel-navision","laravel-ntlm","laravel5","laravel6","microsoft","navision","ntlm","package","unitop"],"created_at":"2024-09-24T13:51:07.963Z","updated_at":"2025-06-20T02:38:07.352Z","avatar_url":"https://github.com/volldigital.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Navision Package (For Laravel V5.8 \u0026 6.X)\n\nA small package to communicate with Microsoft Navision. You can fetch collections and single records.\n\n## Install\n\nRun following commands:\n\n```php\ncomposer require volldigital/laravel-navision\n```\n\n```php\nphp artisan vendor:publish --provider=\"VOLLdigital\\LaravelNavision\\LaravelNavisionServiceProvider\"\n```\n\nEdit your \"config/ntlm.php\" file or use the ENV variables.\n\n## Usage\n\nAfter setting up your config, load the client via:\n\n```php\n$client = app(VOLLdigital\\LaravelNavision\\Client::class);\n\n```\n\nNow you are ready to recieve data from your Navision.\n\nExamples:\n\n```php\n$client = app(VOLLdigital\\LaravelNavision\\Client::class);\n\n$data = $client-\u003efetchCollection(\"Events\");\n\n$event = $client-\u003efetchOne(\"Events\", 'Key', 'Number');\n\n```\n\nYou can also pull data chunk-wise. The data will be written in a text file and after the request finished, it will be parsed and deleted.\n\n```php\n\n$client = app(VOLLdigital\\LaravelNavision\\Client::class);\n\n// file will be stored in /storage/app/temp/curl_uniqueid.temp\n\n$data = $client-\u003efetchCollection(\"Events\", true);\n\n```\n\nYou want to check if your connection to UNITOP is established? You can use the ping function and check it :)\n\n```php\n\n$client = app(VOLLdigital\\LaravelNavision\\Client::class);\n\nif ($client-\u003eping() === false) {\n    throw new RunTimeException('No connection available');\n}\n\n```\n\n\n## Write data\n\nUse `$client-\u003ewriteData(string $url, array $data);` to write data into navision.\n\nExample:\n\n```php\n$client-\u003ewriteData(\n    'Items',\n    [\n        'Item_Code' =\u003e 'VD',\n        'Item_Description' =\u003e 'Test data'\n    ]\n);\n```\n\n## Count items \n\nUse `$client-\u003ecountCollection(\"YourCollection\")` to recieve the amount of items in this collection.\n\nExample:\n\n```php\ndd($client-\u003ecountCollection('Events')); // Outputs: 100293\n```\n\n## Examples\n\n### Query params\n\n* $skip=XXXX    - Skip X amount of itmes\n\n```php\n$temp = $this-\u003eclient-\u003efetchCollection('Events?$skip=10000');\n```\n\n* $top=XXXX     - Recieve X amount of items\n\n```php\n$temp = $this-\u003eclient-\u003efetchCollection('Events?$top=10');\n```\n\n### Fetching data\n\n```php\n    protected function fetchData(string $uri, $key, bool $chunk = false, ?callable $filter = null)\n    {\n        $temp = $this-\u003eclient-\u003efetchCollection($uri, $chunk);\n        $data = [];\n\n        foreach($temp as $ts) {\n            if (!is_null($filter) \u0026\u0026 $filter($ts) === false) {\n                continue;\n            }\n\n            $data[$ts[$key]] = $ts;\n        }\n\n        return collect($data);\n    }\n```\n\n### Pagination\n```php\n    protected function fetchAll()\n    {\n        $number = $this-\u003eclient-\u003ecountCollection('Events');\n        $pageLimit = 10000;\n        $pages = (int)ceil($number / $pageLimit);\n        $events = [];\n\n        for ($i = 0; $i \u003c $pages; $i++) {\n            $skip = $i * $pageLimit;\n\n            $temp = $this-\u003efetchData('Events?$skip='.$skip, 'Number');\n\n            $events = array_merge($events, $temp-\u003etoArray());\n        }\n\n        return collect($events);\n    }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolldigital%2Flaravel-navision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvolldigital%2Flaravel-navision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolldigital%2Flaravel-navision/lists"}