date() 공개 메소드

Add a date field to the map.
public date ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
리턴 Illuminate\Support\Fluent
예제 #1
0
 /**
  * @test
  */
 public function it_adds_a_date_map()
 {
     $blueprint = new Blueprint('post');
     $blueprint->create();
     $blueprint->date('created_at');
     $statement = $blueprint->toDSL($this->getGrammar());
     $this->assertEquals(['created_at' => ['type' => 'date']], $statement);
 }