blessing-skin-server/app/Services/Webpack.php

25 lines
427 B
PHP
Raw Normal View History

2019-03-31 13:12:56 +08:00
<?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)
{
2019-03-31 14:38:17 +08:00
return Arr::get($this->manifest, $path, '');
2019-03-31 13:12:56 +08:00
}
}