Git Product home page Git Product logo

bloging's Introduction

Installation instructions

git clone https://github.com/cbanupama/fidelitus.git
cd fidelitus
composer install

Migration

create a database and then update .env file

php artisan migrate

Seeding data

php artisan db:seed

Serve application

php artisan serve

API

categories api

All categories

response

{
    "id": 2,
    "name": "Eldora Collins I",
    "created_at": "2019-05-29 06:06:29",
    "updated_at": "2019-05-29 06:06:29",
    "posts": [
      {
        "id": 7,
        "category_id": 2,
        "title": "molestiae pariatur molestiae quia",
        "body": "iusto est laudantium eveniet voluptates inventore qui odio suscipit dolor",
        "image": "https://lorempixel.com/640/480/?59764",
        "youtube_link": null,
        "created_at": "2019-05-29 06:06:29",
        "updated_at": "2019-05-29 06:06:29"
      }
    ]
}

One category

response

{
  "id": 1,
  "name": "Dr. Forrest Vandervort",
  "created_at": "2019-05-29 06:06:29",
  "updated_at": "2019-05-29 06:06:29",
  "posts": [
    {
      "id": 1,
      "category_id": 1,
      "title": "placeat deserunt qui nisi",
      "body": "dolores dolorem et qui perferendis libero exercitationem voluptate non iusto",
      "image": "https://lorempixel.com/640/480/?75509",
      "youtube_link": "https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A",
      "created_at": "2019-05-29 06:06:29",
      "updated_at": "2019-05-29 06:06:29"
    },
    {
      "id": 4,
      "category_id": 1,
      "title": "dolor non quia ad",
      "body": "repudiandae ut ea nemo ea numquam natus reiciendis quia exercitationem",
      "image": "https://lorempixel.com/640/480/?43775",
      "youtube_link": "https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A",
      "created_at": "2019-05-29 06:06:29",
      "updated_at": "2019-05-29 06:06:29"
    },
    {
      "id": 8,
      "category_id": 1,
      "title": "error ipsum sit quod",
      "body": "ut ullam fugit inventore reprehenderit sunt quia porro praesentium assumenda",
      "image": "https://lorempixel.com/640/480/?19246",
      "youtube_link": "https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A",
      "created_at": "2019-05-29 06:06:29",
      "updated_at": "2019-05-29 06:06:29"
    }
  ]
}

Update category

response

{
      "id": 1,
      "name": "Dr. Forrest Vandervort updated",
      "created_at": "2019-05-29 06:06:29",
      "updated_at": "2019-05-29 06:06:29"
}

Delete category

response

{
      "id": 1,
      "name": "Dr. Forrest Vandervort",
      "created_at": "2019-05-29 06:06:29",
      "updated_at": "2019-05-29 06:06:29"
}

posts api

All Posts

response

[
  {
    "id": 1,
    "category_id": 1,
    "title": "placeat deserunt qui nisi",
    "body": "dolores dolorem et qui perferendis libero exercitationem voluptate non iusto",
    "image": "https://lorempixel.com/640/480/?75509",
    "youtube_link": "https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A",
    "created_at": "2019-05-29 06:06:29",
    "updated_at": "2019-05-29 06:06:29",
    "content_type": "both image and youtube",
    "category": {
      "id": 1,
      "name": "Dr. Forrest Vandervort",
      "created_at": "2019-05-29 06:06:29",
      "updated_at": "2019-05-29 06:06:29"
    }
  },
  {
    "id": 2,
    "category_id": 6,
    "title": "reiciendis cum adipisci itaque",
    "body": "maiores accusantium ratione tempora harum consequatur voluptas temporibus incidunt et",
    "image": "https://lorempixel.com/640/480/?82508",
    "youtube_link": "https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A",
    "created_at": "2019-05-29 06:06:29",
    "updated_at": "2019-05-29 06:06:29",
    "content_type": "both image and youtube",
    "category": {
      "id": 6,
      "name": "Dr. Joanne Borer",
      "created_at": "2019-05-29 06:06:29",
      "updated_at": "2019-05-29 06:06:29"
    }
  }
]

filtering

response

[
  {
    "id": 1,
    "category_id": 1,
    "title": "placeat deserunt qui nisi",
    "body": "dolores dolorem et qui perferendis libero exercitationem voluptate non iusto",
    "image": "https://lorempixel.com/640/480/?75509",
    "youtube_link": "https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A",
    "created_at": "2019-05-29 06:06:29",
    "updated_at": "2019-05-29 06:06:29",
    "content_type": "both image and youtube",
    "category": {
      "id": 1,
      "name": "Dr. Forrest Vandervort",
      "created_at": "2019-05-29 06:06:29",
      "updated_at": "2019-05-29 06:06:29"
    }
  },
  {
    "id": 4,
    "category_id": 1,
    "title": "dolor non quia ad",
    "body": "repudiandae ut ea nemo ea numquam natus reiciendis quia exercitationem",
    "image": "https://lorempixel.com/640/480/?43775",
    "youtube_link": "https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A",
    "created_at": "2019-05-29 06:06:29",
    "updated_at": "2019-05-29 06:06:29",
    "content_type": "both image and youtube",
    "category": {
      "id": 1,
      "name": "Dr. Forrest Vandervort",
      "created_at": "2019-05-29 06:06:29",
      "updated_at": "2019-05-29 06:06:29"
    }
  }
 ]

One Post

response

{
  "id": 1,
  "category_id": 1,
  "title": "placeat deserunt qui nisi",
  "body": "dolores dolorem et qui perferendis libero exercitationem voluptate non iusto",
  "image": "https://lorempixel.com/640/480/?75509",
  "youtube_link": "https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A",
  "created_at": "2019-05-29 06:06:29",
  "updated_at": "2019-05-29 06:06:29",
  "category": {
    "id": 1,
    "name": "Dr. Forrest Vandervort",
    "created_at": "2019-05-29 06:06:29",
    "updated_at": "2019-05-29 06:06:29"
  }
}

Update Post

response

 {
      "id": 1,
      "category_id": 1,
      "title": "placeat deserunt qui nisi",
      "body": "dolores dolorem et qui perferendis libero exercitationem voluptate non iusto",
      "image": "https://lorempixel.com/640/480/?75509",
      "youtube_link": "https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A",
      "created_at": "2019-05-29 06:06:29",
      "updated_at": "2019-05-29 06:06:29",
   }

Delete Post

response

 {
          "id": 1,
          "category_id": 1,
          "title": "placeat deserunt qui nisi",
          "body": "dolores dolorem et qui perferendis libero exercitationem voluptate non iusto",
          "image": "https://lorempixel.com/640/480/?75509",
          "youtube_link": "https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A",
          "created_at": "2019-05-29 06:06:29",
          "updated_at": "2019-05-29 06:06:29",
  }

bloging's People

Contributors

cbanupama avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.