lundi 17 octobre 2016

Laravel gives different result for mysql query from value saved in database

I am using laravel 5.2 .

I am trying to save urls in my sql database as following :

$table->string('url')->nullable(); 

The saving works perfectly but when i try to retrieve the value,its a bit different from whats saved.

If i save abcd.com/ab , the query result gives abcd.com\/ab. That is an extra \. Has anyone experienced similar issue? Please guide me.

Code for my mysql query :

$site = DB::table('websites')->where('id','=',1)->select('url')->get();

I am new here so if the question has some issues,please let me know. Thanks for reading.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire