PHP code example of vinelab / oclock

1. Go to this page and download the library: Download vinelab/oclock library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vinelab / oclock example snippets


'default' => env('DB_CONNECTION', 'mongodb'),

'connections' => [

    'mongodb' => [
        'driver'   => 'mongodb',
        'host'     => env('DB_HOST', 'localhost'),
        'port'     => env('DB_PORT', 27017),
        'database' => env('DB_DATABASE', 'logs'),
        'username' => env('DB_USERNAME'),
        'password' => env('DB_PASSWORD'),
        'options' => [
            'database' => 'admin' // sets the authentication database 

protected function schedule(Schedule $schedule)
{
    // register schedules here

    // ...

    OClock::register($schedule);
}