Skip to content

Admin CRUD Assignment #4

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

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

Admin CRUD Assignment #4

wants to merge 4 commits into from

Conversation

krissyawaters
Copy link
Owner

Admin CRUD Assignment

  • Make sure public facing products routes only use: index and show
  • Administrator Functionality
  • Create the route necessary for user to be authenticated to view admin section
  • Make sure route is prefixed with 'admin'
  • Create all pages necessary to do CRUD actions on your products
  • On index page:
  • show a button to create a product
  • For each product, you can click button/link to edit and another one to also delete
  • You cannot delete a product without a JavaScript confirmation warning.
  • List the products in a table or tabular fashion.
  • Either show no image or a small one is ok too.
  • Create and Edit Form pages
  • Share error message display code from one file that you include
  • Share common fields in a shared file
  • Validate and repopulate data
  • Use Laravel validation only. Do not use HTML or JavaScript validation. (However, In the real-world you'll use both frontend and backend validation techniques).
  • Do not include id or timestamps in forms
  • Validation code in the controller is defined in one place - not copy pasted for create and edit actions. Validation code should be shared for both.
  • Make sure admin pages have their own layout template used by admin templates only
  • Use Bootstrap to assure pages look decent
  • Assure you are populating flash messages, ie. "Product created", "Product updated", "Product Deleted", etc.

Submission

  • Push assignment/admin branch to Github
  • Create a Pull Request named: Admin CRUD Assignment
  • PR Description
  • Add assignment specifications
  • Screen-record a video showcasing functionality of your CRUD application
  • Include in your demonstration:
  • Login and logout
  • Show that login is required to access admin pages
  • index page
  • show page
  • create form page
  • edit form page
  • validation
  • delete confirm prompt yes/no
  • (Re-) tag me as a reviewer as necessary
Laravel.-.Brave.2024-05-06.13-49-02.mp4

Please let me know if I missed anything or if any changes are needed. Thanks!

@krissyawaters krissyawaters requested a review from kblake May 6, 2024 21:00
Copy link
Collaborator

@kblake kblake left a comment

Choose a reason for hiding this comment

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

I noticed this work was done in the api-calls app. This work should have been a part of the created crud-app work as indicated in the specs: "You'll continue to do work inside of the crud-app".

Also, re: validation: "Use Laravel validation only. Do not use HTML or JavaScript validation. (However, In the real-world you'll use both frontend and backend validation techniques)."

So, remove HTML field requirements and leverage the server-side validation and error reporting that Laravel provides.

Re-record video to demonstrate these changes. Thanks!

@krissyawaters
Copy link
Owner Author

I am having some confusion. With the CRUD: List and Show Assignment, I am quite sure that I did use the wizard to generate a new Laravel app. However, I am unable to find the file on my computer. As it's been some time since I worked on this, I don't remember exactly what was done.

However, I attempted to create a new app and then move all of the files over. All of the files from API-calls were moved into the new project, and there was nothing to migrate. When I attempt to clear the cache or use PHP artisan serve, this is the error that I get.

image

After about an hour of troubleshooting, I am unsure how to proceed. I tried to redownload and verify the composer, but it says the installer is corrupt.

I can fix the HTML field requirements issue. Should I just proceed using API calls w/point deduction?

thank you.

@krissyawaters krissyawaters requested a review from kblake May 7, 2024 23:47
@kblake
Copy link
Collaborator

kblake commented May 8, 2024

@krissyawaters

Thanks for the report. We'll be doing more CRUD things in subsequent assignment(s) so the intention was to have that in its own app.

I can help you with this if you want to set up an appointment. Hopefully its assuring necessary files are in place and renaming things.

Another thought is to push your crud-app to a branch and I can look at it myself and report back.

Let me know what works for you.

Copy link
Collaborator

@kblake kblake left a comment

Choose a reason for hiding this comment

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

How are things going? Do you need help?

@krissyawaters
Copy link
Owner Author

No, I don't. I've decided to drop the program. I don't have the time to dedicate to it any longer. I've started working a lot more hours, have three kids, and am back working in digital marketing. Will be continuing to learn/code in free time.

Thanks for your help. Yours and Nick's classes were some of the most enjoyable at SCC.

@kblake
Copy link
Collaborator

kblake commented May 10, 2024

I respect that. Life is busy, for sure.
Take care and you are always welcome back to the program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants