Skip to content

Conversation

@Hasban-Fardani
Copy link
Collaborator

No description provided.

@billalxcode billalxcode added the enhancement New feature or request label Jul 11, 2024
@billalxcode
Copy link
Collaborator

Use standards-compliant commit messages https://www.conventionalcommits.org/en/v1.0.0/

public function index(Pack $pack)
{
//
return $pack->stickers;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use json responses!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

laravel is atuomaticly convert model to json response so it will return like thi
{
"image": <image_path>,
"pack_id": <pack_id>
}

source: link

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the following format

  1. If successful
    {"status": bool, "data": dict}
  2. If it fails
    {"status": bool, "message": string}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you have to follow the standards? because it will make it easier to process data

public function update(Request $request, Sticker $sticker)
{
//
return $sticker;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

* Remove the specified resource from storage.
*/
public function destroy(Sticker $sticker)
public function destroy(Pack $pack, Sticker $sticker)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete the pack variable if it is not used

@billalxcode billalxcode added the help wanted Extra attention is needed label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants