D
D
Div-Man2018-07-26 20:24:05
Laravel
Div-Man, 2018-07-26 20:24:05

What should a REST application have in the key field?

It is necessary to develop a REST API (CRUD) service.

  • - Create elements
  • - Updating items
  • - Deleting items
  • - Getting information about an element

Input data:
Entity: Item Entity
fields:
id - int autoincrement
name - char(255)
key - char(25) not null
created_at - datetime - item creation date
updated_at - datetime - item update date
What is the key field for , what should be in it be?
How to make the column be key - char(25) not null ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yan-s, 2018-07-26
@Yan-s

What is the key field for

For a certain key as a string of 25 characters.
Exactly what the API designer intended. And this should be reported / indicated in the documentation. How else do you think you should know?
https://laravel.com/docs/migrations#columns - row 5 in the table.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question