Skip to content

Instantly share code, notes, and snippets.

View hgnelson83's full-sized avatar
💭
Happy Coder

HegoSoft hgnelson83

💭
Happy Coder
View GitHub Profile
@hgnelson83
hgnelson83 / HotelquoteCell.php
Last active June 1, 2016 19:21
Cake 3 Hotel App
<!-- src\View\Cell\HotelquoteCell.php -->
<?php
namespace App\View\Cell;
use Cake\View\Cell;
class HotelquoteCell extends Cell
{
protected $_validCellOptions = [];
public function display()
{
public function add()
{
$user = $this->Users->newEntity();
if ($this->request->is('post')) {
$user = $this->Users->patchEntity($user, $this->request->data);
if ($this->Users->save($user)) {
$this->Flash->success(__('The user has been saved.'));
return $this->redirect(['action' => 'index']);
} else {
$this->Flash->error(__('The user could not be saved. Please, try again.'));
public function add()
{
$user = $this->Users->newEntity();
if ($this->request->is('post')) {
$user = $this->Users->patchEntity($user, $this->request->data);
if ($this->Users->save($user)) {
$this->Flash->success(__('The user has been saved.'));
return $this->redirect(['action' => 'index']);
} else {
$this->Flash->error(__('The user could not be saved. Please, try again.'));