mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
25 lines
442 B
PHP
25 lines
442 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 url('app').'/'.Arr::get($this->manifest, $path, '');
|
||
|
}
|
||
|
}
|