adrianodemoura / redirect-post
Componente redirectPost para cakePHP 3
Installs: 39
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
Type:cakephp-plugin
Requires
- php: >=5.6
- cakephp/cakephp: ^3.5
This package is auto-updated.
Last update: 2025-03-26 04:02:40 UTC
README
Considerations
Plugin to redirect and save post.
You can use three types of the storage: session, cache and cookie.
When loadComponent:
$this->loadComponent( 'RedirectPost.Redirect', ['storage'=>'session|cache|cookie']);
Use the force, read the code.
Requirements
cakePHP 3
Installation
$ composer require adrianodemoura/redirect-post
In src/Application.php
:
parent::bootstrap();
$this->addPlugin('RedirectPost');
Usage
In Controller:
public function initialize()
{
parent::initialize();
$this->loadComponent('RedirectPost.Redirect');
}
to save and redirect:
$data = $this->request->getData();
$this->Redirect->save( ['action'=>'acton_target'], $data);
to read:
$data = $this->Redirect->read();
to delete:
$this->Redirect->delete();
Check
In vendor/cakephp-plugins.php
:
'RedirectPost' => $baseDir . '/vendor/adrianodemoura/redirect-post/',
In vendor/composer/autoload_psr4.php
:
'RedirectPost\\' => array($vendorDir . '/adrianodemoura/redirect-post/src'),
'RedirectPost\\Test\\' => array($vendorDir . '/adrianodemoura/redirect-post/tests'),