{
$source = $this->data['global']->getImageFile('favicon_android', 'favicon_144');
$dest = storage_path('favicon.ico');
- dd($dest);
if (!file_exists($dest) || filemtime($source) > filemtime($dest)) {
$ico_lib = new PHP_ICO($source, array(array(16, 16), array(32, 32), array(64, 64), array(128, 128)));
$ico_lib->save_ico($dest);
}
- return response(file_get_contents($dest))->header('Content-Type','text/html');
+ return response(file_get_contents($dest))->header('Content-Type', 'image/x-icon');
}
}
<?php
Route::get('/manifest.webmanifest', '\Cubist\Backpack\app\Http\Controllers\CubistPWAController@manifest');
-Route::get('/favicon', '\Cubist\Backpack\app\Http\Controllers\CubistPWAController@favicon');
+Route::get('/favicon.ico', '\Cubist\Backpack\app\Http\Controllers\CubistPWAController@favicon');