For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');| //get time | |
| date | |
| //sincronizar con reloj nasa | |
| sudo ntpdate -u ntp.nasa.gov time-b.nist.gov |
| public function testStorePhoto_Ok () { | |
| $path = /* path/to/your/file */; | |
| $filename = /* your/file/name */; | |
| $mimeType = /* your/file/mime/type es: 'image/jpeg' */ | |
| $file = new Symfony\Component\HttpFoundation\File\UploadedFile ( | |
| $path . $filename, | |
| $filename, | |
| $mimeType | |
| ); |
| /** | |
| * Override method so includes work with pagination | |
| * @param Int $page | |
| * @return String | |
| */ | |
| public function getUrl($page) | |
| { | |
| $parameters = array( | |
| $this->factory->getPageName() => $page, | |
| ); |
| $ curl -sS https://getcomposer.org/installer | php | |
| $ (sudo) mv composer.phar /usr/local/bin/composer | |
| Manual Method | |
| I found an easier way to globally install composer than the manual proscribed in the github readme.md. It's actually on the getcomposer.org website: | |
| $ curl -s http://getcomposer.org/installer | php |
| #!/bin/sh | |
| # Just copy and paste the lines below (all at once, it won't work line by line!) | |
| # MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
| function abort { | |
| echo "$1" | |
| exit 1 | |
| } | |
| set -e |
| For the scenario, imagine posts has a foreign key user_id referencing users.id | |
| ```php | |
| public function up() | |
| { | |
| Schema::create('posts', function(Blueprint $table) { | |
| $table->increments('id'); | |
| $table->string('title'); | |
| $table->text('body'); |
For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');| alias phpmamp='/Applications/MAMP/bin/php5.3/bin/php' | |
| or | |
| I have created a symlink at the original php location. | |
| 1. Locate your osx php version with: | |
| which php | |
| The result should be: |
| DROP SEQUENCE chat_id_seq | |
| CREATE SEQUENCE chat_id_seq; | |
| DROP TABLE "chat"; | |
| CREATE TABLE "chat" ( | |
| "id" int4 NOT NULL DEFAULT nextval('chat_id_seq'), | |
| "text" text, | |
| "installation_object_id" varchar(256), | |
| "created_at" date, | |
| "updated_at" date, | |
| "account_name" text, |
| dscacheutil -flushcache | |
| sudo killall -HUP mDNSResponder |