PHP code example of angel-source-labs / laravel-expression-grammar
1. Go to this page and download the library: Download angel-source-labs/laravel-expression-grammar library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
angel-source-labs / laravel-expression-grammar example snippets
$this->expectExceptionMessage(ExpressionGrammar::make()
->sqLite('Integrity constraint violation: 19 FOREIGN KEY constraint failed')
->mySql('Syntax error or access violation: 1701 Cannot truncate a table referenced in a foreign key constraint')
->sqlServer('Cannot truncate table \'users\' because it is being referenced by a FOREIGN KEY constraint.')
);
\DB::table('users')->truncate();
$expression = ExpressionGrammar::make()
->mySql("ST_GeomFromText('POINT(1 2)', 4326)")
->mySql("ST_GeomFromText('POINT(1 2)', 4326, 'axis-order=long-lat')", "8.0")
->postgres("ST_GeomFromText('POINT(1 2)', 4326)");