https://github.com/pfieffer/laravelblogapp
Laravel Blog Web App and API for authentication and blog CRUD.
https://github.com/pfieffer/laravelblogapp
api authentication ckeditor laravel laravel-blog mysql passport php
Last synced: about 1 month ago
JSON representation
Laravel Blog Web App and API for authentication and blog CRUD.
- Host: GitHub
- URL: https://github.com/pfieffer/laravelblogapp
- Owner: pfieffer
- Created: 2017-10-07T16:25:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T07:51:15.000Z (over 3 years ago)
- Last Synced: 2025-03-18T17:25:20.195Z (over 1 year ago)
- Topics: api, authentication, ckeditor, laravel, laravel-blog, mysql, passport, php
- Language: PHP
- Homepage: https://stark-cove-11076.herokuapp.com/
- Size: 3.52 MB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blog App
> Laravel blog app.
> Note: This is a WIP Repository.
## Setup :
* Type `git clone https://github.com/pfieffer/LaravelBlogApp.git` or `git clone git@github.com:pfieffer/LaravelBlogApp.git` to clone the repository.
* CD to `LaravelBlogApp`
* Type `composer install`
* Type `composer update`
* Copy *.env.example* to *.env*
* To use MySQL database, set the following in *.env* file :
* set DB_CONNECTION
* set DB_DATABASE
* set DB_USERNAME
* set DB_PASSWORD
* Run DB migrations and seeders: Type `php artisan migrate --seed` to create and populate tables. This will seed the datbase with some sample posts and a user. (User Credentials: email: *test@test.com*, password: *test@123*)
* Run `php artisan key:generate` to generate application keys.
* Run `php artisan passport:install` to setup Passport for api authentication.
* You may need to run `php artisan storage:link` to see the blog post images.
* Also do put an image file with name `noimage.jpg` inside `storage/app/public/cover_images/` directory.
## See api in action:
* Open your favorite REST client like POSTMAN or insomnia.
* `GET` request on `/api/v1/allposts` to see all posts
* `POST` request on `/api/v1/login` with the following JSON body:
```
{
"email":"test@test.com",
"password":"test@123"
}
```
* After the login, you will obtain an `api_token` which you can use to CRUD the post from api.
* An example is to see all the post for a user: `GET` request to `/api/v1/posts` with a `Authorization` header having value `Bearer `
#### Some screenshots of the app:





