{"id":13314691,"url":"https://github.com/kontent-ai/sample-app-php","last_synced_at":"2025-03-10T21:30:39.501Z","repository":{"id":44632354,"uuid":"135130998","full_name":"kontent-ai/sample-app-php","owner":"kontent-ai","description":"Dancing Goat site built with Kontent.ai and Laravel","archived":false,"fork":true,"pushed_at":"2024-12-18T13:47:31.000Z","size":1828,"stargazers_count":1,"open_issues_count":4,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-18T14:48:21.463Z","etag":null,"topics":["delivery-api","hacktoberfest","headless-cms","kontent-ai","kontent-ai-sample","laravel","laravel-framework","php","php8","sample-app","sample-application"],"latest_commit_sha":null,"homepage":"https://kontent.ai/learn/tutorials/develop-apps/get-started/run-sample-app/?tech=php","language":"Less","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"stephenr85/kentico-cloud-sample-app-php","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kontent-ai.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":".github/CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2018-05-28T08:17:42.000Z","updated_at":"2024-12-18T13:47:35.000Z","dependencies_parsed_at":"2023-09-26T14:58:43.181Z","dependency_job_id":null,"html_url":"https://github.com/kontent-ai/sample-app-php","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/kontent-ai%2Fsample-app-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontent-ai%2Fsample-app-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontent-ai%2Fsample-app-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kontent-ai%2Fsample-app-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kontent-ai","download_url":"https://codeload.github.com/kontent-ai/sample-app-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242929988,"owners_count":20208387,"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":["delivery-api","hacktoberfest","headless-cms","kontent-ai","kontent-ai-sample","laravel","laravel-framework","php","php8","sample-app","sample-application"],"created_at":"2024-07-29T18:11:53.484Z","updated_at":"2025-03-10T21:30:39.489Z","avatar_url":"https://github.com/kontent-ai.png","language":"Less","readme":"\u003e [!IMPORTANT]\n\u003e This sample app relies on the Dancing Goat project, which is no longer available for creation in Kontent.ai.\n\u003e\n\u003e If you still wish to use this project, you can import the Dancing Goat project using the [Data Ops](https://github.com/kontent-ai/data-ops) tool by following the instructions provided in our [Dancing Goat repository](https://github.com/kontent-ai-bot/dancing-goat).\n\n# Kontent.ai sample Laravel PHP web application\n\n[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-ASK%20NOW-FE7A16.svg?logo=stackoverflow\u0026logoColor=white)](https://stackoverflow.com/tags/kontent-ai)\n[![Discord](https://img.shields.io/discord/821885171984891914?color=%237289DA\u0026label=Kontent.ai%20Discord\u0026logo=discord)](https://discord.gg/SKCxwPtevJ)\n\nThis is a sample website written in PHP 7 using [Laravel](https://laravel.com) framework and [Kontent.ai Delivery SDK for PHP](https://github.com/kontent-ai/delivery-sdk-php). You can register your Kontent account for free at [https://app.kontent.ai](https://app.kontent.ai).\n\n## Application setup\n\nBefore you can run the app, make sure your environment is set up correctly with [PHP 8+](https://www.php.net/downloads.php) and the [Composer](https://getcomposer.org/) package manager installed.\n\n* For Windows, see how to [configure Visual Studio Code for PHP development](https://github.com/kontent-ai/delivery-sdk-php/blob/master/wiki/Developing-PHP-in-Visual-Studio-Code-for-Dummies.md).\n* For Linux distributions, see how to [configure PHP Storm for PHP development](https://github.com/kontent-ai/delivery-sdk-php/blob/master/wiki/Configuring-PHP-Storm-on-Linux.md).\n\nOnce these prerequisites are met, you can run the application as follows:\n\n1. Clone this repository.\n1. In your command line, navigate to the project folder.\n1. Run `composer install` to install dependencies.\n1. (Optional) Run `composer run prepare-environment` to create a sample [Laravel environment file](https://laravel.com/docs/6.x/configuration#environment-configuration).\n1. Run `php artisan serve` to run the sample app.\n\nThe app is now running locally at [`127.0.0.1:8000`](127.0.0.1:8000) (default) and you can open it in your browser.\n\nAlternatively, you can also deploy your application to your Apache server  by cloning the repository, running `composer install`, and accessing corresponding address on your server.\n\n### Connecting your project\n\nThis sample website displays content from a Sample Project that demonstrates Kontent.ai features and best practices. This fully featured project contains marketing content for Dancing Goat – an imaginary chain of coffee shops. By default, this sample website uses a shared project where the content remains constant for everyone.\n\nYou can change the source Kontent.ai project to your own project to be able to change the content. If you don't have your own Sample Project, any admin of a Kontent.ai subscription [can generate one](https://kontent.ai/learn/tutorials/manage-kontent/projects/manage-projects#a-create-a-sample-project).\n\nWhen you have a Sample Project, follow these steps to connect it to this sample app:\n\n1. In Kontent.ai, choose Project settings from the app menu.\n1. Under Development, choose API keys.\n1. Copy your Project ID.\n1. Set you `PROJECT_ID` environment variable - most probably in `.env` file\n1. Save the `.env` file and restart the server.\n\nNow when you run the sample application, content is retrieved from your project.\n\n### Compile resources\n\nIf you want to adjust CSS and Javascript file, you need to rebuild them.\n\nFirst you need to install [yarn](https://yarnpkg.com/) and install dependencies by running following command in repository root.\n\n```sh\nyarn\n```\n\n#### Development compilation\n\nFor development purposes you want to turn on development mode of compilation wit hot-reload capabilities.\n\n```sh\nyarn watch // or `yarn dev` for single development compilation\n```\n\n#### Production compilation\n\nTor production compilation, run:\n\n```sh\nyarn prod\n```\n\n## Content administration\n\n1. Navigate to https://app.kontent.ai in your browser.\n1. Sign in with your credentials.\n1. Manage content in the content administration interface of your sample project.\n\nYou can learn more about content editing with in the [Kontent.ai Learn portal](https://kontent.ai/learn/).\n\n## Content delivery\n\nYou can retrieve content either through the Kontent.ai Delivery SDKs or the Kontent.ai Delivery API:\n\n* For published content, use `https://deliver.kontent.ai/PROJECT_ID/items`.\n* For unpublished content, use `https://preview-deliver.kontent.ai/PROJECT_ID/items`.\n\nFor more info about the API, see the [API reference](https://kontent.ai/learn/reference/kontent-apis-overview).\n\nYou can find the Delivery and other SDKs at [Kontent.ai Github Organization](https://github.com/kontent-ai).\n\n## Feedback \u0026 Contributing\n\nCheck out the [contributing](https://github.com/kontent-ai/sample-app-php/blob/master/CONTRIBUTING.md) page to see the best places to file issues, start discussions, and begin contributing.\n\n## Author\n\nWe would like to express our thanks to [Stephen Rushing](https://github.com/stephenr85) who created this sample application.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkontent-ai%2Fsample-app-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkontent-ai%2Fsample-app-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkontent-ai%2Fsample-app-php/lists"}