mercredi 23 mars 2016

Relative path for asset function for laravel

I am using laravel 5.1 framework and I want to use asset() function in blade templates.

Problem is that my application can have different domains: http://www.domain1.com and http://www.domain2.com in development mode.

When I use correct asset() syntax, it adds full path to a file, including domain.

   <link href="{{ asset("/css/style.css") }}" type="text/css" />

converts to

  <link href="http://ift.tt/1pHF2r6" type="text/css" />

Question is: Is it possible to configure laravel, so it will not add full domain name. Expected result is:

<link href="/css/style.css" type="text/css" />

Any ideas?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire