PHP Classes

File: update.php

Recommend this page to a friend!
  Classes of Ahmad Mustapha   Simple React PHP CRUD   update.php   Download  
File: update.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple React PHP CRUD
Manipulate records in a page done using ReactPHP
Author: By
Last change:
Date: 3 years ago
Size: 423 bytes
 

Contents

Class file image Download
<?php

use Crud\User;
use
React\EventLoop\Factory;

require
'vendor/autoload.php';

$loop = Factory::create();

$user = new User($loop);

$user->update(1, 'Carliedu_01', 'cld.001')
    ->
then(function () use ($user) {
        echo(
"\nUser information updated successfully.\n");
       
$user->getConnection()->close();
    })
    ->
otherwise(function (Throwable $exception) {
        echo
$exception;
    });

$loop->run();