Skip to content

Conversation

@senagokhan
Copy link

@senagokhan senagokhan commented Jan 6, 2025

I implemented user CRUD operations using the Laravel framework.
I successfully integrated user creation,reading, updating, and deletion functionalities.
I made all operations compatible with Vue.js and Inertia.js and optimized the database connections.

@senagokhan senagokhan self-assigned this Jan 6, 2025
@senagokhan senagokhan changed the title #11-users-crud-operations #11 Users Crud Operations Jan 6, 2025
Copy link
Member

@EwelinaSkrzypacz EwelinaSkrzypacz left a comment

Choose a reason for hiding this comment

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

  1. Please fix checks - all are failed.
  2. When I want to register, after filling form and click "Register" button I see error

image

  1. Where is navigation? All pages should have navigation like here.

image

  1. When I'm on user index page and I click "Create user" button I see error in dev console. The same thing happens when I click "Edit button"

image

  1. Add button in navigation to user list - now I had to manually write url to the page

  2. Add validation in create/edit form - for example, when user go to create user page and fills nothing, just click "Save" nothing happens - he should see validation messages under each field like "email is required"; also we should validate length of fields. Also email should be unique maybe?

  3. Create user form - please fix warning in dev console

image

  1. Create user form - when I click "Cancel" button I see error (the same thing happens on edit user form)

image

  1. I'm not fan of this solution - we should make custom modals for deleting stuff

image

  1. Missing title on browser card

image


class UserController extends Controller
{
/**
Copy link
Member

Choose a reason for hiding this comment

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

These comments don't add value to the code and could be removed to improve readability.

...tseslint.configs.recommended,
...pluginVue.configs["flat/essential"],
{files: ["**/*.vue"], languageOptions: {parserOptions: {parser: tseslint.parser}}},
];
Copy link
Member

Choose a reason for hiding this comment

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

Remember to add empty line at the end of the file

@@ -0,0 +1,89 @@
<template>
Copy link
Member

Choose a reason for hiding this comment

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

Please fix all GitHub errors

<div>
<h1 class="text-2xl mb-4">Create User</h1>

<!-- User creation form -->
Copy link
Member

Choose a reason for hiding this comment

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

Please remove all unnecessary comments

</div>
</template>

<script>
Copy link
Member

Choose a reason for hiding this comment

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

Please move <script> tag at the top of the file, like we have for example in Register.vue file

};
</script>

<style scoped>
Copy link
Member

Choose a reason for hiding this comment

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

I think that we can style this using tailwind CSS classes - there is no need to use scope style here

Copy link
Member

Choose a reason for hiding this comment

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

Maybe create components for inputs, buttons and all elements that will be often use? Thanks to that we will have consistent design and programming views will be faster. Please talk about that with others.

use Notifiable;
use HasApiTokens, HasFactory, Notifiable;

public mixed $id;
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this?

use HasApiTokens, HasFactory, Notifiable;

public mixed $id;
protected $table = 'users';
Copy link
Member

Choose a reason for hiding this comment

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

And this?

methods: {
createUser() {
// Logic to handle user creation (e.g., make an API call)
this.$inertia.post(route('users.store'), this.user);
Copy link
Member

Choose a reason for hiding this comment

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

I think we can make it more simply - like we have in Register.vue file (line 16)

@senagokhan senagokhan changed the title #11 Users Crud Operations #11 - users-crud-operations Jan 9, 2025
@senagokhan senagokhan changed the title #11 - users-crud-operations #11 - users crud operations Jan 9, 2025
Copy link
Member

@EwelinaSkrzypacz EwelinaSkrzypacz left a comment

Choose a reason for hiding this comment

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

I'll be happy to review this PR once all checks have passed and my feedback has been implemented.

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.

3 participants