DB::updateで、update文を書けばOKです。
namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; use App\Account; class AccountController extends Controller { // public function index() { // $account = Account::first(); // dd($account->login_id); DB::update('update account set login_id = "adminUser" where id = ?', ['1']); } }
deleteの場合
namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; use App\Account; class AccountController extends Controller { // public function index() { // $account = Account::first(); // dd($account->login_id); DB::delete('delete from account where id = ?', ['2']); } }