Horje
laravel 8 delete by id Code Example
laravel 8 delete by id
//For a User table, to delete ID 1:

  $user = User::find(1);

  $user->delete();

//OR
  
  User::where('id', 1)->delete();

//OR
  
  User::destroy(1);

//OR
  
  User::destroy([1, 2, 3]);  //Delete id 1, 2 and 3




Php

Related
How do I check if a string contains a specific word php Code Example How do I check if a string contains a specific word php Code Example
carbon add minutes Code Example carbon add minutes Code Example
dump all variables twig Code Example dump all variables twig Code Example
orberby laravel Code Example orberby laravel Code Example
if word exist in string Code Example if word exist in string Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7