File tree Expand file tree Collapse file tree 3 files changed +26
-7
lines changed
Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,6 @@ abstract class FMModel extends Model
1919
2020 use FMHasRelationships;
2121
22-
23- /**
24- * The text format to use when saving/retrieving Date fields from FileMaker
25- * @var string
26- */
27- protected $ dateFormat = 'n/j/Y g:i:s A ' ;
28-
2922 /**
3023 * Indicates if the model should be timestamped.
3124 *
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace BlueFeather \EloquentFileMaker \Database \Query \Grammars ;
4+
5+ use Illuminate \Database \Query \Grammars \Grammar ;
6+
7+ class FMGrammar extends Grammar
8+ {
9+
10+ /**
11+ * Get the format for database stored dates.
12+ *
13+ * @return string
14+ */
15+ public function getDateFormat ()
16+ {
17+ return 'n/j/Y g:i:s A ' ;
18+ }
19+
20+ }
Original file line number Diff line number Diff line change 66
77use BlueFeather \EloquentFileMaker \Database \Eloquent \FMEloquentBuilder ;
88use BlueFeather \EloquentFileMaker \Database \Query \FMBaseBuilder ;
9+ use BlueFeather \EloquentFileMaker \Database \Query \Grammars \FMGrammar ;
910use BlueFeather \EloquentFileMaker \Exceptions \FileMakerDataApiException ;
1011use GuzzleHttp \Exception \ConnectException ;
1112use GuzzleHttp \Exception \RequestException ;
@@ -631,4 +632,9 @@ protected function retryMiddleware()
631632 return 0 ;
632633 });
633634 }
635+
636+ protected function getDefaultQueryGrammar ()
637+ {
638+ return new FMGrammar ();
639+ }
634640}
You can’t perform that action at this time.
0 commit comments