I am creating a table like this:
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('places', function (Blueprint $table) {
$table->engine = 'MyISAM';
$table->increments('id');
$table->text('description');
$table->longText('address');
$table->point('coordinates');
$table->timestamps();
});
}
I created a field directly to my database using:
INSERT INTO `places` (`id`, `description`, `address`, `coordinates`, `created_at`, `updated_at`)
VALUES
(1, 'Plaza Condesa', 'Av. Juan Escutia 4, Hipodromo Condesa, Hipódromo, 06140 Cuauhtémoc, CDMX', X'000000000101000000965B5A0D89693340CC1B711214CB58C0', NULL, NULL);
Then I retrieve it in Laravel using:
MyModel::first()
All the values seem to be correctly except the coordinates field where I get something like this:
�[Z
�i3@�q�X�
How can I get the POINT field using Laravel?