blessing-skin-server/app/Services/Webpack.php
2019-03-31 14:38:17 +08:00

25 lines
427 B
PHP

<?php
namespace App\Services;
use File;
use Illuminate\Support\Arr;
class Webpack
{
protected $manifest = [];
public function __construct()
{
$path = public_path('app/manifest.json');
if (File::exists($path)) {
$this->manifest = json_decode(File::get($path), true);
}
}
public function __get($path)
{
return Arr::get($this->manifest, $path, '');
}
}