Customize Dashboard index

dashboard when installing Atomic Panel ,dashboard file published in resources/views/vendor/atomic/partials/dashboard.blade.php you can customize it as you like.

Do you need custom data in the dashboard.blade ?

Sure ! , open app/Providers/AtomicServiceProvider.php and add this method :

 protected function dashboardIndexData()
 {
     return [
         'totalUsers'=>2
     ];
 }
1
2
3
4
5
6

and in resources/views/vendor/atomic/partials/dashboard.blade.php you can display the data like so:

@extends('atomic::layout')
@section('header')


@endsection
@section('content')

    <div class="container-fluid">
        <div class="row p-t-30">
            <div class="col-sm-12">
                <div class="white-box text-center">
                    <h1>Total Users (<strong>{{$data['totalUsers']}}</strong>)</h1>
                </div>
            </div>
        </div>

    </div>

@endsection
@section('footer')


@endsection


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25