{"id":19907641,"url":"https://github.com/levimykel/prismic-laravel-sample-website","last_synced_at":"2026-05-10T21:41:25.693Z","repository":{"id":117845432,"uuid":"79574178","full_name":"levimykel/prismic-laravel-sample-website","owner":"levimykel","description":"A sample website using prismic.io and the Laravel framework","archived":false,"fork":false,"pushed_at":"2017-04-20T16:19:28.000Z","size":230,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T22:14:56.537Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levimykel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2017-01-20T16:08:37.000Z","updated_at":"2017-01-24T10:21:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7f367d4-ea6c-484b-944c-db25e8ffee6b","html_url":"https://github.com/levimykel/prismic-laravel-sample-website","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levimykel%2Fprismic-laravel-sample-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levimykel%2Fprismic-laravel-sample-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levimykel%2Fprismic-laravel-sample-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levimykel%2Fprismic-laravel-sample-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levimykel","download_url":"https://codeload.github.com/levimykel/prismic-laravel-sample-website/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241335590,"owners_count":19946085,"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":[],"created_at":"2024-11-12T20:43:24.312Z","updated_at":"2025-11-26T03:04:29.229Z","avatar_url":"https://github.com/levimykel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Sample Website with prismic.io \u0026 Laravel\n\nThis is an example website using the [Laravel framework](https://laravel.com/) with content managed from [prismic.io](https://prismic.io/) (API-based CMS).\n\nTo see this website example in action, just follow these instructions to get it up and running.\n\n### Install the project\n\nIf you don't already have Laravel installed on your local machine you can view the [Laravel installation page](https://laravel.com/docs/5.3/installation) to get started.\n\nAfter you download the project files, finish installing the project by running the following command in the project folder:\n\n```\n$ composer install\n```\n\n#### Add content on prismic.io\n\nBefore this project can be launched, you need to set up a prismic.io repository and add some content. To create a new prismic repository visit http://prismic.io/create.\n\n##### Create custom types\n\nYou will first need to create three different custom types for this website project: Homepage, Page, and Menu.\n\nSet up the **Homepage** custom type as a **Single Type**, and give it the name **\"Homepage\"**.\n\nSet up the **Page** custom type as a **Repeatable Type**, and give it the name **\"Page\"**.\n\nSet up the **Menu** custom type as a **Single Type**, and give it the name **\"Menu\"**.\n\nThe JSON for each of these custom types can be found in the custom_types folder of this project. For each custom type, simply copy and paste the code into the JSON editor and save.\n\n##### Create content\n\nNext go to the Content page of your repository and create some pages and a menu. For each document of the Page type, make sure to add a unique identifier that will be used for the page's url on the site.\n\n##### Update the prismic.io endpoint\n\nNext, update the prismic.io API endpoint in your project configurations. In config/prismic.php, update the following configuration with your repository's endpoint.\n\n```\n'url' =\u003e 'https://sample-website-test.prismic.io/api'\n```\n\n#### Launch the website\n\nNow everything is in place to launch the project on your local machine. Run the following command from the project folder:\n\n```\n$ php artisan serve\n```\n\n### prismic.io specific project files\n\nHere are the files of this project that are specific to connect this website to your prismic repository and load the content. \n\n##### config/prismic.php\n\nYou'll find the prismic configurations in config/prismic.php. Here's where you'll configure the API enpoint of your content repository and add the API access token if you configure your repository to have a private API.\n\n##### app/LinkResolver.php\n\nHere's where you can see the link resolver that will create the url paths for the website's pages.\n\n##### app/Http/Middleware/ConnectToPrismic.php\n\nThis is the middleware that connects to the prismic API.\n\n##### app/Providers/PrismicServiceProvider.php\n\nThe prismic service provider runs the prismic composer for all routes.\n\n##### app/Http/ViewComposers/PrismicComposer.php\n\nThe prismic composer queries the website menu content and binds both the menu content and the link resolver to the view. \n\n##### resources/views\n\nYou can find the views for the website homepage and pages are found in the resources/views folder. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevimykel%2Fprismic-laravel-sample-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevimykel%2Fprismic-laravel-sample-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevimykel%2Fprismic-laravel-sample-website/lists"}