Read project version from composer.json #16
1 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
<?php
|
||||||
|
// Get and decode composer.json
|
||||||
|
$content = file_get_contents(__DIR__ . '/../../../composer.json');
|
||||||
|
$content = json_decode($content, true);
|
||||||
|
|
||||||
|
// Get the version number
|
||||||
|
$version = $content['version'];
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
|
@ -9,9 +17,9 @@
|
||||||
@yield('title')
|
@yield('title')
|
||||||
</title>
|
</title>
|
||||||
@if(isset($front) && $front == false)
|
@if(isset($front) && $front == false)
|
||||||
<link rel="stylesheet" type="text/css" href="/assets/css/back/start.css?=sdfsdf">
|
|
||||||
@elseif(!isset($front) || $front == true)
|
@elseif(!isset($front) || $front == true)
|
||||||
<link rel="stylesheet" type="text/css" href="/assets/css/front/start.css?=sdfsdf">
|
<link rel="stylesheet" type="text/css" href="/assets/css/back/start.css?v=<?php echo($version); ?>">
|
||||||
|
<link rel="stylesheet" type="text/css" href="/assets/css/front/start.css?v=<?php echo($version); ?>">
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Add table
Reference in a new issue