Download the PHP package strongbond/db-watcher without Composer

On this page you can find all versions of the php package strongbond/db-watcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package db-watcher

db-watcher

PHP package to keep tracks of modification that happens on your tables.

Note: this works based on triggers. So even the modification that are happening directly on table via some ide are also tracked.

Step 0 : php artisan vendor:publish

    // This step will put the config file [dbwatcher.php] in the config folder.
    Below is the content in config file
    return [
    "db_name" => env("DB_DATABASE"),
    "tables_to_track" => [

    ["table" => "supplier_master", "column" => ["supplier_name","qnty"], "track_event" => ["insert", "update","delete]],

    // table name for which tracking is required, can't be left blank
    // column key if empty will track all columns 
    // track_event is an array of events to track if empty will track all events

    ],
    "log_table_name" => 'sb_log',
    "common_columns_to_ignore" => ["created_at", "updated_at", "deleted_at"]
    ];

Step 1 : Create a new object

    $db_tracker_obj = new DBWatcher();

Step 2 : Generate the tracking tables | once done you can skip this step | 2 tables are created

    $db_tracker_obj->drop_recreate_log_tables();

Step 3 : Generate the tracking triggers | once any changes are done in the dbwatcher.php config file you need to run this step agian for new changes to reflect.

    $db_tracker_obj->refreshTracker();

Step 4 : Set the user_id for the user who is going to be modifying the db. if you miss this step root@localhost will be used.

    $db_tracker_obj->action_performed_by_user(5);

Step 5 : Perform the CRUD operations.

    DB::table("venues")->insert([
        "venue_name" => "Carnival",
        "venue_location" => "Mumbai",         
        "created_at" => Carbon::now()->toDateTimeString(),
        "updated_at" => Carbon::now()->toDateTimeString()
    ]);

Step 6 : Unset the user_id after the CRUD operations.

    $db_tracker_obj->unset_action_performed_by_user();

All versions of db-watcher with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package strongbond/db-watcher contains the following files

Loading the files please wait ....