Skip to content

faxunil/vue-demo-by-rrd

Repository files navigation

Build Status Total Downloads Latest Stable Version License

Telepítés:

git clone https://github.com/faxunil/vue-demo-by-rrd.git demo Állítsuk be a tárhelyen az adatbázist. A .ENV fájl hozzuk létre, amelyben állítsuk be a létrehozott MySQL adatbázis eléréséhez szükséges adatokat.

composer install php artisan key:generate php artisan migrate:fresh --seed artisan storage:link (ha a tárhelyen nem működik a symlink() php-s fgv akkor kézzel kell létrehozni.

API endpointok

Felhasználói regisztráció: POST api/register

Request Header: Content-Type: application/json

{
  "name": "rrd",
  "email": "[email protected]",
  "password": "Gauranga"
}

Response

{
  "data": {
    "token": "1|lrJzdF2AWrVhi4JnycictT4XmHDBbxe496uOiJnp",
    "user": {
      "email": "[email protected]",
      "name": "rrd",
      "is_admin": 0,
      "updated_at": "2022-02-13T15:42:42.000000Z",
      "created_at": "2022-02-13T15:42:42.000000Z",
      "id": 12
    },
    "is_admin": 0
  },
  "message": "Sikeres regisztráció"
}

Felhasználói bejelentkezés: POST api/login

Request Header: Content-Type: application/json

{
  "email": "[email protected]",
  "password": "Gauranga"
}

Response

{
  "data": {
    "token": "2|rOG4cjVwVzQPZLzyMVVoAAKFoEPafwSMvDjhdxzk",
    "user": {
      "id": 12,
      "email": "[email protected]",
      "name": "rrd",
      "is_admin": 0,
      "tasks": [
        {
          "id": 108,
          "user_id": 12,
          "task": "rrd teszt",
          "comment": null,
          "due_date": "2022-02-28 00:00:00",
          "completed_at": null,
          "deleted_at": null,
          "created_at": "2022-02-20T12:42:36.000000Z",
          "updated_at": "2022-02-20T12:42:36.000000Z"
        }
      ]
    },
    "is_admin": 0
  },
  "message": "Logged in successfully."
}

Új feladat létrehozása: POST api/task

Request - Bearer tokkenel Header: Content-Type: application/json Accept: application/json

{
  "user_id": "12",
  "task": "új feladat minta",
  "due_date": "2022-02-28"
}

Response

{
  "data": {
    "id": 101,
    "user_id": "12",
    "task": "új feladat minta",
    "comment": null,
    "due_date": "2022-02-28 00:00:00",
    "completed_at": "null",
    "duration": "00-0-7 11:34:24",
    "deleted_at": "null",
    "created_at": "2022-02-20 12:25:36",
    "updated_at": "2022-02-20 12:25:36",
    "user": {
      "id": 12,
      "email": "[email protected]",
      "name": "rrd",
      "is_admin": 0
    }
  }
}

Feladat módosítása: PATCH task/{TASKID}

Request - Bearer tokkenel Header: Content-Type: application/json Accept: application/json

{
  "user_id": 12,
  "task": "módosított task név"
}

Response

{
  "data": {
    "id": 126,
    "user_id": 12,
    "task": "módosított task név",
    "comment": null,
    "due_date": "2022-03-28 00:00:00",
    "completed_at": "",
    "duration": "00-1-5 09:7:1",
    "deleted_at": "",
    "created_at": "2022-03-13 09:02:59",
    "updated_at": "2022-03-13 09:07:01",
    "user": {
      "id": 12,
      "email": "[email protected]",
      "name": "rrd",
      "is_admin": 0
    }
  }
}

Feladat késznek jelölése: PATCH task/{TASKID}/status

Request - Bearer tokkenel Header: Content-Type: application/json Accept: application/json

{
  "completed_at": "2022-03-17"
}

Response

{
  "data": {
    "id": 107,
    "user_id": 12,
    "task": "első task szerkesztve",
    "comment": null,
    "due_date": "2022-02-25 00:00:00",
    "completed_at": "2022-03-17 00:00:00",
    "duration": "00-0-20 00:0:0",
    "deleted_at": null,
    "created_at": "2022-02-20 13:40:21",
    "updated_at": "2022-03-17 14:30:47",
    "user": {
      "id": 12,
      "email": "[email protected]",
      "name": "rrd",
      "is_admin": 0
    }
  }
}

Feladat törlése: DELETE task/{TASKID} - soft delete

Request - Bearer tokkenel Header: Content-Type: application/json Accept: application/json

A request body üres.

Response

{
  "data": {
    "task": {
      "id": 108,
      "user_id": 12,
      "task": "Második task",
      "comment": null,
      "due_date": "2022-03-02 00:00:00",
      "completed_at": null,
      "deleted_at": "2022-02-20T14:26:49.000000Z",
      "created_at": "2022-02-20T13:45:39.000000Z",
      "updated_at": "2022-02-20T14:26:49.000000Z"
    }
  },
  "message": "Inaktiválva"
}

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

If you don't feel like reading, Laracasts can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Patreon page.

Premium Partners

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [email protected]. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

vue-demo-by-rrd

About

RRD Vue.js Demo videóhoz Laravel 9 API backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages