Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

How to use Delete Statement in Laravel 5

by
Category:laravel
mysql laravel
How to use Delete Statement in Laravel 5

We can delete the record using the DB facade with execute a delete statement (delete the record from the database). Like update, the number of rows affected by the statement will be returned.

Let’s create a delete Statement in laravel 5

namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use DB;

class PostController extends Controller
{
    public function DeleteData()
    {
         DB::delete('delete from post');    
    }
}

0 Comments


Html code work in comment box


Related Post