mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
27 lines
460 B
PHP
27 lines
460 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
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(string $path)
|
|
{
|
|
return Arr::get($this->manifest, $path, '');
|
|
}
|
|
}
|