Download the PHP package faz-b/redbean-silex-provider without Composer
On this page you can find all versions of the php package faz-b/redbean-silex-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package redbean-silex-provider
redbean-silex-provider
A RedBean service provider for Silex
Provider
// src/app.php
use Fazb\RedBean\RestServiceProvider
$app['data_dir'] = __DIR__ . '/../var/data';
$app['rb.options'] = array(
'dsn' => sprintf('sqlite://%s/app.db', $app['data_dir']),
'namespace' => 'Site\\Model\\',
'freeze' => !$app['debug']
);
$app->register(new RedBeanServiceProvider());
Model
<?php
namespace Site\Model;
use Fazb\RedBean\Model\BaseModel;
/**
* Contact
*/
class Contact extends BaseModel
{
public function fullName()
{
return sprintf('%s %s', $this->firstName, $this->lastName);
}
}
Model Helper
sluggable, timestampable event based
$app['redbean.model.helpers'] = array(
'article' => array(
'sluggable' => array(
'events' => array(
'update' => array('title')
),
// Default
'options' => array(
'fieldName' => 'slug'
)
),
'timestampable' => array(
// Default
'events' => array(
'dispense' => array('created_at'),
'update' => array('updated_at')
),
'options' => array(
'dateFormat' => 'Y-m-d H:i:s'
)
)
)
);
All versions of redbean-silex-provider with dependencies
PHP Build Version
Package Version
The package faz-b/redbean-silex-provider contains the following files
Loading the files please wait ....