laravel modified to remove the code

Test function () {
$ id = Request () -> route ( 'id'); // received parameter id
// update data
$ id =. 4;
$ :: Table Age = Db ( "Users") -> WHERE ( "user_id", "=", $ id) -> update ([ 'user_name' => ' username']);
// var_dump ($ Age); it is true that the update is successful
; $ the above mentioned id = 6
// delete data
DB :: the Table RES = $ ( 'the Users') -> the WHERE ( 'user_id', '=', the above mentioned id $) -> the delete ();
IF ($ RES) {
return 'tongpankt.com prompted to delete success';
the else {}
return 'tongpankt.com prompted to remove failed';
}
}

Guess you like

Origin www.cnblogs.com/ayanboke/p/11245240.html