d

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.

15 St Margarets, NY 10033
(+381) 11 123 4567
ouroffice@aware.com

 

KMF

Inertia.js Adapter for Statamic | Laravel News

Inertia-statamic by Adam Campbell is a Statamic server-side adapter for Intertia.js used to build single-page apps without building an API.

The Intertia.js adapter will work for Statamic pages or content available through Statamic collections. Once you follow the readme setup instructions, Statamic page objects will be available in given Vue components as props.

Here’s a visualization of props given in the project’s readme:

InertiaResponse {#2587 ▼
  #component: "Marketing/Overview"
  #props: array:22 [▼
    "amp_url" => null
    "api_url" => null
    "collection" => array:3 [▶]
    "content" => array:4 [▶]
    "date" => IlluminateSupportCarbon @1617827556 {#2478 ▶}
    "edit_url" => "http://mysite.test/cp/collections/marketing/entries/f854a1cf-0dcf-404b-8418-a74662ba77e7/overview"
    "id" => "f854a1cf-0dcf-404b-8418-a74662ba77e7"
    "is_entry" => true
    "last_modified" => IlluminateSupportCarbon @1617827556 {#2477 ▶}
    "mount" => null
    "order" => null
    "parent" => null
    "permalink" => "http://mysite.test/marketing"
    "private" => false
    "published" => true
    "slug" => "overview"
    "template" => "app"
    "title" => "Overview"
    "updated_at" => IlluminateSupportCarbon @1617827556 {#2523 ▶}
    "updated_by" => array:4 [▶]
    "uri" => "/marketing"
    "url" => "/marketing"
  ]
  #rootView: "app"
  #version: ""
  #viewData: []

You can learn more about this package, get full installation instructions, and view the source code on GitHub. Since this package uses Statamic and Intertia.js, check out the Inertia.js documentation and the Statamic 3 Docs.


Credit: Source link

Previous Next
Close
Test Caption
Test Description goes like this