Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

CRUD opration bug in laravel metronic theme


When i click on add user button at that time it will open an empty form but when i click on edit user and after that without close i discard form and then after i open add user form it will open a form with last opened data and when i create it will update that last opened user not create new user.

Please check video for the reference:
Link


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)

Hi Nipesh,

Sorry for the delay. We appreciate your patience. We have identified the issue and will be fixing it in the upcoming release.

As a temporary workaround, you can add the following code:

  1. Open the file /resources/views/pages/metronic/apps/user-management/users/list.blade.php

  1. Open the file /app/Livewire/User/AddUserModal.php
protected $listeners = [
    //...
    'new_user' => 'hydrate',
];
public function hydrate()
{
    //...
    // add reset function
    $this->reset();
}

This code ensures that when the 'Add User' modal is closed, it will dispatch an event to reset the form fields, preventing the issue of creating a new user with the last opened user's data.

Thank you for bringing this to our attention, and we apologize for any inconvenience caused. If you have any further questions or concerns, feel free to reach out.

Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(