Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/pack stickers #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Feat/pack stickers #37

wants to merge 2 commits into from

Conversation

Hasban-Fardani
Copy link
Collaborator

No description provided.

@billalxcode
Copy link
Collaborator

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

{
//
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.

2 participants