Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
<?php | |
namespace Acme\UserBundle\Listener; | |
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; | |
use Symfony\Component\Security\Core\SecurityContext; | |
use Doctrine\Bundle\DoctrineBundle\Registry as Doctrine; // for Symfony 2.1.0+ | |
// use Symfony\Bundle\DoctrineBundle\Registry as Doctrine; // for Symfony 2.0.x | |
/** |
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
html, body, .container, .content { | |
height: 100%; | |
} | |
.container, .content { | |
position: relative; | |
} | |
.proper-content { | |
padding-top: 40px; /* >= navbar height */ |
// based on and inspired by https://gist.github.com/1026439 and https://gist.github.com/3798781 | |
// | |
// MIT license. Use however you'd like. | |
// | |
// first, define our macro for delaying our transition: | |
#define PKWaitDelay(dly, block) dispatch_after(dispatch_time(DISPATCH_TIME_NOW,dly*100000),dispatch_get_current_queue(), ^{ block }) | |
// then, inside your AppDelegate.m in didFinishLaunchingWithOptions: | |
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.window.frame]; |
var gulp = require('gulp'); | |
var phpspec = require('gulp-phpspec'); | |
var run = require('gulp-run'); | |
var notify = require('gulp-notify'); | |
gulp.task('test', function() { | |
gulp.src('spec/**/*.php') | |
.pipe(run('clear')) | |
.pipe(phpspec('', { notify: true })) | |
.on('error', notify.onError({ |
--- | |
- hosts: all | |
tasks: | |
- name: ensure SSH key is generated | |
command: ssh-keygen -t rsa -f /root/.ssh/id_rsa -N '' | |
args: | |
creates: /root/.ssh/id_rsa |
DROP TABLE currency; | |
-- Create table variable | |
CREATE TABLE currency ( | |
name VARCHAR(20), | |
code VARCHAR(3), | |
symbol VARCHAR(5) | |
); | |
ALTER TABLE currency CONVERT TO CHARACTER SET utf8; |
If you want the ability to charge a team owner based on how many members their team has, like $10/user/month, then you utilize the Laravel Cashier functionality of incrementing the quantity.
You listen for when a new team member is added and you increase the quantity of the subscription by the amount of users and also listen for when a team member is removed to downsize charges. - Not Braintree Compatible
'Laravel\Spark\Events\Teams\TeamMemberAdded' => [
#!/usr/bin/env node | |
// Using the firebase-admin approach where database security rules do not apply. | |
// Here you are authenticating with a private key. The key JSON file is available via | |
// the Firebase web UI: project settings > service accounts > generate new private key. | |
var admin = require("firebase-admin"); | |
admin.initializeApp({ | |
credential: admin.credential.cert(".adminServiceAccountKey.json"), |