{"_id":"576ecdc14d787c0e00624227","category":{"_id":"576ec7b7560eef0e00cd3096","version":"576ebdb79c84a31900958abd","__v":0,"project":"576ebdb79c84a31900958aba","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-06-25T18:04:39.266Z","from_sync":false,"order":3,"slug":"deployment","title":"Basics"},"__v":15,"parentDoc":null,"project":"576ebdb79c84a31900958aba","user":"576ebd239c84a31900958ab9","version":{"_id":"576ebdb79c84a31900958abd","project":"576ebdb79c84a31900958aba","__v":10,"createdAt":"2016-06-25T17:21:59.854Z","releaseDate":"2016-06-25T17:21:59.854Z","categories":["576ebdb79c84a31900958abe","576ebfc59c84a31900958ac4","576ec32f52f96619007cfb9a","576ec7b7560eef0e00cd3096","576ed4249c84a31900958add","576ed429560eef0e00cd30a3","576ed43a52f96619007cfbb5","576ed44d5a8c72170082b794","577212f20da40019004f0816","57725c7e0a6d610e00de9e4c"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.3.0","version":"3.3"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-25T18:30:25.608Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Meta data are runtime configuration information that are only available on current request. It similar to Laravel configuration repository but without the persistent information. This make it useful for adding information that is specific to the current request.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Basic Usage\"\n}\n[/block]\nA common usage of meta data is to define current page title:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\nuse Orchestra\\\\Support\\\\Facades\\\\Meta;\\n\\nMeta::set('title', 'Welcome');\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"<h1>\\n\\t{{ Meta::get('title') }}\\n</h1>\",\n      \"language\": \"html\",\n      \"name\": \"Blade\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"`Meta` is aliased by default under the default Orchestra Platform skeleton.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using Helpers\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\nset_meta('title', 'Welcome');\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"<h1>\\n  {{ get_meta('title') }}\\n</h1>\",\n      \"language\": \"html\",\n      \"name\": \"Blade\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using Blade Directives\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \":::at:::set_meta('title', 'Welcome')\\n\\n<h1>\\n  @get_meta('title')\\n</h1>\",\n      \"language\": \"html\",\n      \"name\": \"Blade\"\n    }\n  ]\n}\n[/block]","excerpt":"Runtime Meta Data","slug":"meta-data","type":"basic","title":"Meta"}

Meta

Runtime Meta Data

Meta data are runtime configuration information that are only available on current request. It similar to Laravel configuration repository but without the persistent information. This make it useful for adding information that is specific to the current request. [block:api-header] { "type": "basic", "title": "Basic Usage" } [/block] A common usage of meta data is to define current page title: [block:code] { "codes": [ { "code": "<?php\n\nuse Orchestra\\Support\\Facades\\Meta;\n\nMeta::set('title', 'Welcome');", "language": "php" }, { "code": "<h1>\n\t{{ Meta::get('title') }}\n</h1>", "language": "html", "name": "Blade" } ] } [/block] [block:callout] { "type": "info", "body": "`Meta` is aliased by default under the default Orchestra Platform skeleton." } [/block] [block:api-header] { "type": "basic", "title": "Using Helpers" } [/block] [block:code] { "codes": [ { "code": "<?php\n\nset_meta('title', 'Welcome');", "language": "php" }, { "code": "<h1>\n {{ get_meta('title') }}\n</h1>", "language": "html", "name": "Blade" } ] } [/block] [block:api-header] { "type": "basic", "title": "Using Blade Directives" } [/block] [block:code] { "codes": [ { "code": "@set_meta('title', 'Welcome')\n\n<h1>\n @get_meta('title')\n</h1>", "language": "html", "name": "Blade" } ] } [/block]