PHP code example of marklj / funnel
1. Go to this page and download the library: Download marklj/funnel 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/ */
marklj / funnel example snippets
// config/funnel.php
[
// ...
'action_mappings' => [
'PostBlog' => \App\Blog\Actions\PostAction::class,
// other mappings here
]
]
namespace App\Blog\Actions;
use Marklj\Funnel\Actionable;
use Marklj\Funnel\ActionPayload;
class PostAction implements Actionable
{
public function __invoke(ActionPayload $payload) {
print 'Hello Funnel!';
print 'Blog Post Title: ' . $payload->get('blog_title');
}
}
sh
php artisan vendor:publish