PHP code example of satnin / cakeflow

1. Go to this page and download the library: Download satnin/cakeflow 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/ */

    

satnin / cakeflow example snippets


// bootstrap/providers.php
return [
    App\Providers\AppServiceProvider::class,
    //Add the line bellow
    \cakeflow\Providers\CakeflowServiceProvider::class
];

// app/Http/Controllers/Controller.php 
abstract class Controller extends \cakeflow\Controllers\Controller
{
}

//  app/Http/Controllers/Components/MyComponent.php 
class MyComponent extends \cakeflow\Controllers\Components\Component
{
    public function startup(EventInterface|null $event = null)
    {
        // Startup logic here for example
    }
}

class TestController extends Controller
{
    public function initialize()
    {
        parent::initialize();
        $this->loadComponent(AuthComponent::class);
    }
    public function beforeFilter(\cakeflow\Dispatchers\Events\EventInterface $event)
    {
        parent::beforeFilter($event); // TODO: Change the autogenerated stub
    }
    public function beforeRender(\cakeflow\Dispatchers\Events\EventInterface $event)
    {
        parent::beforeRender($event); // TODO: Change the autogenerated stub
    }
    //...
}