Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shahednasser/strapi-laravel-blog
Code for Laravel blog with Strapi
https://github.com/shahednasser/strapi-laravel-blog
blog laravel laravel-cms laravel-framework strapi strapi-cms strapi-tutorial strapi-v4
Last synced: 17 days ago
JSON representation
Code for Laravel blog with Strapi
- Host: GitHub
- URL: https://github.com/shahednasser/strapi-laravel-blog
- Owner: shahednasser
- Created: 2021-12-16T19:33:41.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-10T00:41:14.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T14:54:12.812Z (3 months ago)
- Topics: blog, laravel, laravel-cms, laravel-framework, strapi, strapi-cms, strapi-tutorial, strapi-v4
- Language: PHP
- Homepage: https://blog.shahednasser.com/create-laravel-blog-with-strapi-v4/
- Size: 3.11 MB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Strapi + Laravel Tutorial
Code for tutorial for [Laravel blog with Strapi v4](https://blog.shahednasser.com/create-laravel-blog-with-strapi-v4/).
## Prerequisites
1. Node v12 or v14. v14 is recommended
2. PHP >= 7.3
3. Composer## Installation
Change to the `strapi` directory and run the following:
```bash
npm install
```Then, change to the `blog` directory and run the following:
```bash
composer install
```You also need to copy and rename `.env.example` to `.env`:
```bash
cp .env.example .env
```Then, add the following environment variables at the end of `.env`:
```
STRAPI_URL=
STRAPI_API_TOKEN=
````STRAPI_URL` is the URL to your Strapi installation. If you're running it local, it should be `http://localhost:1337`.
`STRAPI_API_TOKEN` is the API Token you create in Strapi Admin. You can check the tutorial to learn how to do that.
## Run the Servers
Change to the `strapi` directory and run the following command:
```bash
npm run develop
```This will start Strapi's server at `http://localhost:1337`.
You'll need to add the content types and entries using the admin. You can follow along in the tutorial to learn how to do that.
Then, go to the `blog` directory using another terminal and run the following command:
```bash
php artisan serve
```This will start the Laravel server at `http://localhost:8000`.