public function testMagicMethodsCanBeUsedToSetAttributes() { $fluent = new Fluent(); $fluent->name = 'Taylor'; $fluent->developer(); $fluent->age(25); $this->assertEquals('Taylor', $fluent->name); $this->assertTrue($fluent->developer); $this->assertEquals(25, $fluent->age); $this->assertInstanceOf('Laravel\\Fluent', $fluent->programmer()); }
/** * Generate the SQL statement for creating a primary key. * * @param Table $table * @param Fluent $command * @return string */ public function primary(Table $table, Fluent $command) { return $this->key($table, $command->name(null), 'PRIMARY KEY'); }