@stylesheets('public-css') Code is not working on Live Server
ranaanees opened this issue · comments
On my local machine following code in blade view show all css...
<-/head>
@Stylesheets('public-css')
<-/head>
On Live Server it shows nothing. Only difference is on Live Server I put assets folder outside public folder.....
Config setting:
'public-css' => function($collection)
{
$collection->directory('assets/css', function($collection)
{
$collection->add('bootstrap.min.css');
$collection->add('bootstrap-responsive.min.css');
$collection->add('style.css');
})->apply('UriRewriteFilter');
},
Where could be the issue,,,
Your looking for the assets inside public. This here $collection->directory('assets/css')
is looking in public for an assets
directory. You need to use $collection->directory('../assets/css')
to navigate outside public. All paths are relative to public.
@jasonlewis thanks,
It shows css and path is correct. but there is another error....The styles don't implement....When I Inspect Element in chrome and view css file sometimes it is empty...it also show message in title....
Whoops! There was an error
Help Please...Thanks
Instead of Basset...I directly apply css like below...
On local machine it works ok....but on server cs done apply and when view code in firefox
and visit css link
When i browse any image from images folder....it gives following error..
Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException
So, finally i am not able to access any asset.....what settings missing...
Check if you have uploaded the hidden .htaccess file to the public folder.