{"id":41969959,"url":"https://github.com/adminarchitect/navigation","last_synced_at":"2026-01-25T23:17:57.472Z","repository":{"id":56940974,"uuid":"72435392","full_name":"adminarchitect/navigation","owner":"adminarchitect","description":"High configurable navigation builder based on providers.","archived":false,"fork":false,"pushed_at":"2017-10-24T13:12:56.000Z","size":61,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-30T14:50:18.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/adminarchitect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-31T12:44:09.000Z","updated_at":"2018-01-30T20:31:11.000Z","dependencies_parsed_at":"2022-08-21T07:20:33.161Z","dependency_job_id":null,"html_url":"https://github.com/adminarchitect/navigation","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/adminarchitect/navigation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adminarchitect%2Fnavigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adminarchitect%2Fnavigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adminarchitect%2Fnavigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adminarchitect%2Fnavigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adminarchitect","download_url":"https://codeload.github.com/adminarchitect/navigation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adminarchitect%2Fnavigation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28761813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T23:06:19.311Z","status":"ssl_error","status_checked_at":"2026-01-25T23:03:50.555Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-25T23:17:56.826Z","updated_at":"2026-01-25T23:17:57.464Z","avatar_url":"https://github.com/adminarchitect.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Navigation\n\nNavigation is a Laravel based (AdminArchitect oriented) package to handle dynamic menus.\nLinksProvider, RoutesProvider, EloquentProvider are provided out of the box.\n\n# Caution\nNote, that `adminarchitect/navigation` is based on [AdminArchitect](http://adminarchitect.com) package and won't work without it.\n\n# Installation\n\n```\ncomposer require adminarchitect/navigation\n```\n\nAdd following lines to your config/app.php\n\n* add `Terranet\\Navigation\\ServiceProvider::class` line to `providers` array\n* add `'Navigation' =\u003e Terranet\\Navigation\\Facade::class,` line to `aliases` array\n\nRun:\n```\nphp artisan vendor:publish --provider=\"Terranet\\\\Navigation\\\\ServiceProvider\"\nphp artisan navigation:table\nphp artisan migrate\n```\n\n# Providers\n\nNavigation is based on Providers, each of them can provide a collection of navigable items and should realize one of default contracts or maybe define new one.\n\n* `LinksProvider`: Provides a way to add static links: url =\u003e title;\n* `RoutesProvider`: Provides a way to add routes to menu;\n* `EloquentProvider`: Provides a way to add Eloquent models to a navigable collection.\n\nAll usable providers are registered via config/navigation.php file -\u003e `providers` array.\n\nTo create a new provider, run: `php artisan navigation \u003cName\u003e`, then register it in config/navigation.php.\n\nAny provider which extends EloquentProvider should provide a collection of items which implement NavigationItem contract.\nNavigationItem requires implementation of 3 simple methods:\n1. navigationKey =\u003e should return item unique key, usually `id`;\n2. navigationTitle =\u003e should return item title, may be: `title`, `name`, whatever identifies a model title.\n3. navigationUrl =\u003e should return item specific url, may return `url(\u003curl\u003e)` or `route(\u003cname\u003e, \u003cparams\u003e)`\n\nfor instance, to allow adding `Posts` to a navigation you have to create a `PostsProvider`, then modify your `Post` model to look like in the following example:\n\n```\nphp artisan navigation:provider PostsProvider\n```\n\n`Provider` command will generate `app\\Http\\Terranet\\Administrator\\Navigation\\Providers\\PostsProvider` class:\n\n```\n\u003c?php\n\nnamespace App\\Http\\Terranet\\Administrator\\Navigation\\Providers;\n\nuse Terranet\\Navigation\\Providers\\EloquentProvider;\n\nclass PostsProvider extends EloquentProvider\n{\n    /**\n     * Eloquent model.\n     */\n    protected $model;\n}\n```\n\nNow you only have to provide a valid eloquent $model, for instance `App\\Post`:\n\n```\nprotected $model = \\App\\Post::class;\n```\n\nNext, register it in `config/navigation.php`\n\n```\n'providers' =\u003e [\n    ...\n    \\App\\Http\\Terranet\\Administrator\\Navigation\\Providers\\PostsProvider::class,\n    ...\n]\n```\n\nNavigable Eloquent model should implement NavigationItem contract, so `App\\Post` should be like:\n\n```\nclass Post extends Model implements NavigationItem\n{\n    protected $fillable = [\n        'user_id', 'title', 'slug', 'published', 'image',\n    ];\n\n    public function navigationKey()\n    {\n        return $this-\u003eid;\n    }\n\n    public function navigationTitle()\n    {\n        return $this-\u003etitle;\n    }\n\n    public function navigationUrl()\n    {\n        return route('posts.show', ['slug' =\u003e $this-\u003eslug]);\n    }\n}\n```\n\n# Enjoy!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadminarchitect%2Fnavigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadminarchitect%2Fnavigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadminarchitect%2Fnavigation/lists"}