Skip to content

Commit 18b306a

Browse files
authored
Merge pull request #274 from vrkansagara/master
Adding analytics for backed layout
2 parents 845b4ff + 193b07c commit 18b306a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![GitHub issues](https://img.shields.io/github/issues/viralsolani/laravel-adminpanel.svg?style=plastic)](https://github.com/viralsolani/laravel-adminpanel/issues)
66
![StyleCI](https://img.shields.io/badge/styleCI-passed-brightgreen.svg?style=plastic)
77

8+
## [Demo](https://laravel-adminpanel.vrkansagara.in/)
89

910
## Introduction
1011
* This is a laravel Admin Panel, based on [Rappasoft Laravel Boilerplate](https://github.com/rappasoft/laravel-5-boilerplate/releases/tag/4.5.7), with enhancemenets and many modules pre-made, just for you.

app/Http/Controllers/Backend/DashboardController.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use App\Models\Access\Role\Role;
88
use App\Models\Access\User\User;
99
use Illuminate\Http\Request;
10-
10+
use App\Models\Settings\Setting;
1111
/**
1212
* Class DashboardController.
1313
*/
@@ -18,7 +18,10 @@ class DashboardController extends Controller
1818
*/
1919
public function index()
2020
{
21-
return view('backend.dashboard');
21+
$settingData = Setting::first();
22+
$google_analytics = $settingData->google_analytics;
23+
24+
return view('backend.dashboard',compact('google_analytics', $google_analytics));
2225
}
2326

2427
/**

resources/views/backend/layouts/app.blade.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
<script>
3939
window.Laravel = {!! json_encode([ 'csrfToken' => csrf_token() ]) !!};
4040
</script>
41+
<?php
42+
if(!empty($google_analytics)){
43+
echo $google_analytics;
44+
}
45+
?>
4146
</head>
4247
<body class="skin-{{ config('backend.theme') }} {{ config('backend.layout') }}">
4348
<div class="loading" style="display:none"></div>

0 commit comments

Comments
 (0)