Skip to content

Commit

Permalink
added date type support to templates
Browse files Browse the repository at this point in the history
  • Loading branch information
victoryoalli committed Oct 18, 2021
1 parent d9a012f commit da6cccc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion resources/views/blade/views/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<input name="{{$column->name}}" @if($column->type == 'String')
type="text"
maxlength="{{$column->length}}"
@elseif($column->type == 'DateTime')
@elseif(str($column->type)->matches('/Date/'))
type="date"
@elseif(str($column->type)->matches('/Int/'))
type="number"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/blade/views/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
@if($column->type == 'String')
type="text"
maxlength="{{$column->length}}"
@elseif($column->type == 'DateTime')
@elseif(str($column->type)->matches('/Date/'))
type="date"
@elseif(str($column->type)->matches('/Int/'))
type="number"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/blade/views/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<input readonly name="{{$column->name}}" @if($column->type == 'String')
type="text"
maxlength="{{$column->length}}"
@elseif($column->type == 'DateTime')
@elseif(str($column->type)->matches('/Date/'))
type="date"
@elseif(str($column->type)->matches('/Int/'))
type="number"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/views/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
@if($column->type == 'String')
type="text"
maxlength="{{$column->length}}"
@elseif($column->type == 'DateTime')
@elseif(str($column->type)->matches('/Date/'))
type="date"
@elseif(str($column->type)->matches('/Int/'))
type="number"
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/views/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
readonly name="{{$column->name}}" @if($column->type == 'String')
type="text"
maxlength="{{$column->length}}"
@elseif($column->type == 'DateTime')
@elseif(str($column->type)->matches('/Date/'))
type="date"
@elseif(str($column->type)->matches('/Int/'))
type="number"
Expand Down

0 comments on commit da6cccc

Please sign in to comment.