Laravel Tip - Make Column Unique With Soft Delete
Вставка
- Опубліковано 19 вер 2024
- In this video, we will be looking at a very useful laravel tip where we will learn how to make a column unique along with with soft delete.
=== Support ===
If you want me to continue making this kind of video for free on UA-cam, then you can help me financially by sending a few bucks to my Wise (bit.ly/3dnBRmX) account in Nepalese 🇳🇵 currency.
My Wise email: ashish.dhamala2015@gmail.com
=== Social Media Links ===
Let's be friends
/ aashish_dhamala
=== Video Related Links ===
GitHub link
github.com/Lar...
Ecommerce Project - Playlist
• E-Commerce
=== Other Videos ===
What's New In Laravel 9
• Laravel 9 Is Released ...
New In Laravel Playlist
• New In Laravel
Laravel Package Development Playlist
• Laravel Package Develo...
Password Validation In Laravel with at least one Letters, Numbers, Upper and Lowercase or Symbols:
• Password Validation In...
Multiple Apis With ForwardsCalls Trait And Code Refactoring Tip - Laravel Hidden Feature:
• Multiple Apis With For...
Laravel Chunking - You Might Be Doing This Wrong - Problem and Solution:
• Laravel Chunking - You...
Laravel Tip - Properly Get Data Between Two Dates
• Laravel Tip - Properly...
Get Data From Multiple Databases In One Project | Laravel Tip
• Get Data From Multiple...
=== Theme and Font Used ===
Theme:
Cobalt2 Theme Official (marketplace.vi...)
Font:
JetBrains Mono (www.jetbrains....)
=== Tech stack ===
Laravel
PHP
#laravel #php #laraveltip #laratips
Very Helpful , Thanks laratips
Always welcome
Lots of thanks ❤
helpful, i also followed that person because of cool stuff on sql. and really thanks to you to demonstrate it 🖤
very helpful tips like always
Glad to hear that!
Awesome ! Thanks for sharing this 🙏
You are welcome
Keep up the good work. Thanks!
Thanks, a lot
Thanks
Welcome
This is great!
Thanks
it was outside the stadium..thank you
Looks cool, but too complicated, and what if in the future you find some bugs related to this implementation and you forgot about it 😬 what would you do?
In my view soft deletes are prone to bugs. You can always forget to exclude the soft deleted data if you are not using the model when building the query. This has happened to me previously 😅.
Hello. Thank you very much for this wonderful video. What database management system do you use? that's really cool
i believe it's called DBeaver
Yes, It's DBeaver. It is cross-platform open-source app.
Hello.
What will happen if reset deleted user and try to login ?
Which emile will use if both users have some email and password ?
The attempt method will get the first user from the database. You need to make sure it picks the correct user.
If i restore 1st id then match 1st id email and 11th id email are same.
Yes, you are right. If we are using soft delete, then we have to check it ourself in the application. You can say it as one of the disadvantages.
what is the IDE used for running php script shown in the video?
Tinkerwell
Yes, it's Tinkerwell
The question is, why doesn't Laravel validation take soft deletes into consideration when most people are using soft deletes in their apps?
I have seen many projects and it's actually opposite. Most of them were not using soft deletes. Seems like personal preference, that's why Laravel might not have made it default.
I want to know how to add 1 button in trash to clear all table
Any idea ?
I search a lot in google and many blogs
Do you mean all table or all data of one table?
@@Laratips just the table that contains soft deleted products (trash) button to clear that with 1 click
I tryed it with datatable
@@Laratips any solution without datatable ?
You can do this when a button is clicked:
User::trashed()->delete();
Give your vs code extensions list .. please sir
These are the extensions I use:
Error Lens
File Utils
Git History
GitLens - Git supercharted
Headwind
Import Cost
Laravel Blade formatter
Laravel Blade Snippets
Laravel Blade Spacer
Laravel Blade Wrapper
Laravel Docs
Laravel Extra Intellisense
Laravel goto view
Laravel Pint
Laravel-goto-components
Laravel-goto-controller
PHP class generator
PHP constructor
PHP Intelephense
PHP Namespace Resolver
phpfmt - php formatter
PHPUnit
Tailwind CSS IntelliSense
Tailwind Docs
Turbo Console Log
UUID Generator
vscode-icons
Volar
Vue peek
vuetify-vscode
@@Laratips thanks you sir