@@ -35,28 +35,28 @@ |
||
35 | 35 | * @var string |
36 | 36 | */ |
37 | 37 | protected $stubsController = [ |
38 | - 'controllers' => [ |
|
39 | - 'DashboardEpormasController.stub', |
|
40 | - 'EpormasCategoryController.stub', |
|
41 | - 'EpormasCityController.stub', |
|
42 | - 'EpormasCounterController.stub' |
|
43 | - ] |
|
38 | + 'controllers' => [ |
|
39 | + 'DashboardEpormasController.stub', |
|
40 | + 'EpormasCategoryController.stub', |
|
41 | + 'EpormasCityController.stub', |
|
42 | + 'EpormasCounterController.stub' |
|
43 | + ] |
|
44 | 44 | ]; |
45 | 45 | |
46 | 46 | protected $stubsModel = [ |
47 | - 'models' => [ |
|
48 | - 'EpormasCategory.stub', |
|
49 | - 'EpormasCity.stub', |
|
50 | - 'EpormasCounter.stub' |
|
51 | - ] |
|
47 | + 'models' => [ |
|
48 | + 'EpormasCategory.stub', |
|
49 | + 'EpormasCity.stub', |
|
50 | + 'EpormasCounter.stub' |
|
51 | + ] |
|
52 | 52 | ]; |
53 | 53 | |
54 | 54 | protected $stubsSeeds = [ |
55 | - 'seeds' => [ |
|
56 | - 'EpormasCategoryTableSeeder.stub', |
|
57 | - 'EpormasCityTableSeeder.stub', |
|
58 | - 'EpormasCounterTableSeeder.stub' |
|
59 | - ] |
|
55 | + 'seeds' => [ |
|
56 | + 'EpormasCategoryTableSeeder.stub', |
|
57 | + 'EpormasCityTableSeeder.stub', |
|
58 | + 'EpormasCounterTableSeeder.stub' |
|
59 | + ] |
|
60 | 60 | ]; |
61 | 61 | |
62 | 62 | /** |
@@ -71,31 +71,31 @@ |
||
71 | 71 | |
72 | 72 | protected function controllerViewCreate() |
73 | 73 | { |
74 | - foreach($this->stubsController['controllers'] as $stub) |
|
74 | + foreach ($this->stubsController['controllers'] as $stub) |
|
75 | 75 | { |
76 | - File::put(base_path('app/Http/Controllers/').str_replace('stub','php',$stub),File::get(__DIR__.'/../../stubs/Controllers/'.$stub)); |
|
76 | + File::put(base_path('app/Http/Controllers/').str_replace('stub', 'php', $stub), File::get(__DIR__.'/../../stubs/Controllers/'.$stub)); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | |
80 | 80 | protected function modelViewCreate() |
81 | 81 | { |
82 | - foreach($this->stubsModel['models'] as $stub) |
|
82 | + foreach ($this->stubsModel['models'] as $stub) |
|
83 | 83 | { |
84 | - File::put(base_path('app/').str_replace('stub','php',$stub),File::get(__DIR__.'/../../stubs/Models/'.$stub)); |
|
84 | + File::put(base_path('app/').str_replace('stub', 'php', $stub), File::get(__DIR__.'/../../stubs/Models/'.$stub)); |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
88 | 88 | protected function routeViewCreate() |
89 | 89 | { |
90 | - File::append(base_path('routes/web.php'),File::get(__DIR__.'/../../stubs/routesweb.stub')); |
|
91 | - File::append(base_path('routes/api.php'),File::get(__DIR__.'/../../stubs/routesapi.stub')); |
|
90 | + File::append(base_path('routes/web.php'), File::get(__DIR__.'/../../stubs/routesweb.stub')); |
|
91 | + File::append(base_path('routes/api.php'), File::get(__DIR__.'/../../stubs/routesapi.stub')); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | protected function seedsViewCreate() |
95 | 95 | { |
96 | - foreach($this->stubsSeeds['seeds'] as $stub) |
|
96 | + foreach ($this->stubsSeeds['seeds'] as $stub) |
|
97 | 97 | { |
98 | - File::put(base_path('database/seeds/').str_replace('stub','php',$stub),File::get(__DIR__.'/../../stubs/seeds/'.$stub)); |
|
98 | + File::put(base_path('database/seeds/').str_replace('stub', 'php', $stub), File::get(__DIR__.'/../../stubs/seeds/'.$stub)); |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 |
@@ -41,11 +41,11 @@ |
||
41 | 41 | */ |
42 | 42 | public function register() |
43 | 43 | { |
44 | - $this->app->singleton('epormas', function ($app) { |
|
44 | + $this->app->singleton('epormas', function($app) { |
|
45 | 45 | return new Epormas; |
46 | 46 | }); |
47 | 47 | |
48 | - $this->app->singleton('command.epormas', function ($app) { |
|
48 | + $this->app->singleton('command.epormas', function($app) { |
|
49 | 49 | return new EpormasCommand; |
50 | 50 | }); |
51 | 51 |
@@ -17,8 +17,8 @@ discard block |
||
17 | 17 | { |
18 | 18 | //Pegawai Epormas |
19 | 19 | $grafikepormascounter = DB::table('epormas_counter') |
20 | - ->select('tahun','bulan','city_id', DB::raw('SUM(count) as count')) |
|
21 | - ->whereNull('deleted_at')->groupBy('tahun','bulan','city_id')->orderBy('bulan')->get(); |
|
20 | + ->select('tahun', 'bulan', 'city_id', DB::raw('SUM(count) as count')) |
|
21 | + ->whereNull('deleted_at')->groupBy('tahun', 'bulan', 'city_id')->orderBy('bulan')->get(); |
|
22 | 22 | $grafiktahunepormascounter = DB::table('epormas_counter') |
23 | 23 | ->select('tahun', DB::raw('SUM(count) as count')) |
24 | 24 | ->whereNull('deleted_at')->groupBy('tahun')->orderBy('tahun')->get(); |
@@ -40,51 +40,51 @@ discard block |
||
40 | 40 | $grafikbulanepormascounter = []; |
41 | 41 | $grafiktotalepormascounter = []; |
42 | 42 | $grafikpieepormascounter = []; |
43 | - for($q=0; $q<$countgrafiktahunepormascounter; $q++){ |
|
43 | + for ($q = 0; $q < $countgrafiktahunepormascounter; $q++) { |
|
44 | 44 | $tahungrafikepormascounter = $grafiktahunepormascounter[$q]->tahun; |
45 | 45 | $gcountepormascounter = (int)$grafiktahunepormascounter[$q]->count; |
46 | 46 | $totaldataepormascounter = $gcountepormascounter; |
47 | - array_push($datagrafiktahunepormascounter,$tahungrafikepormascounter); |
|
48 | - array_push($datagrafikcountepormascounter,$gcountepormascounter); |
|
49 | - array_push($datagrafiktotalepormascounter,$totaldataepormascounter); |
|
47 | + array_push($datagrafiktahunepormascounter, $tahungrafikepormascounter); |
|
48 | + array_push($datagrafikcountepormascounter, $gcountepormascounter); |
|
49 | + array_push($datagrafiktotalepormascounter, $totaldataepormascounter); |
|
50 | 50 | |
51 | - for($kota=1; $kota<=$countcity; $kota++){ |
|
52 | - for ($index=0; $index<12; $index++) { |
|
51 | + for ($kota = 1; $kota <= $countcity; $kota++) { |
|
52 | + for ($index = 0; $index < 12; $index++) { |
|
53 | 53 | $grafikcountepormascounter[$q][$kota][$index] = 0; |
54 | 54 | $grafikbulanepormascounter[$q][$kota][$index] = 0; |
55 | 55 | $grafiktotalepormascounter[$q][$kota][$index] = 0; |
56 | - $grafikpieepormascounter[$q][$kota][$index] = ['value'=>0,'name'=>$namaBulan[$index]]; |
|
56 | + $grafikpieepormascounter[$q][$kota][$index] = ['value'=>0, 'name'=>$namaBulan[$index]]; |
|
57 | 57 | $totaldatagrafikepormascounter[$q][$index] = 0; |
58 | 58 | } |
59 | 59 | } |
60 | - for($r=0; $r<$countgrafikepormascounter; $r++){ |
|
60 | + for ($r = 0; $r < $countgrafikepormascounter; $r++) { |
|
61 | 61 | $tahunsepormascounter = $grafikepormascounter[$r]->tahun; |
62 | 62 | $bulansepormascounter = $grafikepormascounter[$r]->bulan; |
63 | 63 | $city_id = $grafikepormascounter[$r]->city_id; |
64 | - if($bulansepormascounter < 10){ |
|
65 | - $bulanepormascounter = substr($bulansepormascounter,1); |
|
64 | + if ($bulansepormascounter < 10) { |
|
65 | + $bulanepormascounter = substr($bulansepormascounter, 1); |
|
66 | 66 | }else { |
67 | 67 | $bulanepormascounter = $bulansepormascounter; |
68 | 68 | } |
69 | - if($tahungrafikepormascounter == $tahunsepormascounter){ |
|
69 | + if ($tahungrafikepormascounter == $tahunsepormascounter) { |
|
70 | 70 | $totaldatagrafikepormascounter[$q][$bulanepormascounter-1] += $grafikepormascounter[$r]->count; |
71 | 71 | } |
72 | 72 | } |
73 | - for($r=0; $r<$countgrafikepormascounter; $r++){ |
|
73 | + for ($r = 0; $r < $countgrafikepormascounter; $r++) { |
|
74 | 74 | $tahunsepormascounter = $grafikepormascounter[$r]->tahun; |
75 | 75 | $bulansepormascounter = $grafikepormascounter[$r]->bulan; |
76 | 76 | $city_id = $grafikepormascounter[$r]->city_id; |
77 | - if($bulansepormascounter < 10){ |
|
78 | - $bulanepormascounter = substr($bulansepormascounter,1); |
|
77 | + if ($bulansepormascounter < 10) { |
|
78 | + $bulanepormascounter = substr($bulansepormascounter, 1); |
|
79 | 79 | }else { |
80 | 80 | $bulanepormascounter = $bulansepormascounter; |
81 | 81 | } |
82 | - if($tahungrafikepormascounter == $tahunsepormascounter){ |
|
82 | + if ($tahungrafikepormascounter == $tahunsepormascounter) { |
|
83 | 83 | $grafikcountepormascounter[$q][$city_id][$bulanepormascounter-1] = (int)$grafikepormascounter[$r]->count; |
84 | 84 | $grafikbulanepormascounter[$q][$city_id][$bulanepormascounter-1] = $grafikepormascounter[$r]->bulan; |
85 | 85 | $totaldatagrafikepormascounters = $totaldatagrafikepormascounter[$q][$bulanepormascounter-1]; |
86 | 86 | $grafiktotalepormascounter[$q][$city_id][$bulanepormascounter-1] = $totaldatagrafikepormascounters; |
87 | - $grafikpieepormascounter[$q][$city_id][$bulanepormascounter-1] = ['value'=>$totaldatagrafikepormascounters,'name'=>$namaBulan[$bulanepormascounter-1]]; |
|
87 | + $grafikpieepormascounter[$q][$city_id][$bulanepormascounter-1] = ['value'=>$totaldatagrafikepormascounters, 'name'=>$namaBulan[$bulanepormascounter-1]]; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $city_id = $grafikepormascounter[$r]->city_id; |
64 | 64 | if($bulansepormascounter < 10){ |
65 | 65 | $bulanepormascounter = substr($bulansepormascounter,1); |
66 | - }else { |
|
66 | + } else { |
|
67 | 67 | $bulanepormascounter = $bulansepormascounter; |
68 | 68 | } |
69 | 69 | if($tahungrafikepormascounter == $tahunsepormascounter){ |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $city_id = $grafikepormascounter[$r]->city_id; |
77 | 77 | if($bulansepormascounter < 10){ |
78 | 78 | $bulanepormascounter = substr($bulansepormascounter,1); |
79 | - }else { |
|
79 | + } else { |
|
80 | 80 | $bulanepormascounter = $bulansepormascounter; |
81 | 81 | } |
82 | 82 | if($tahungrafikepormascounter == $tahunsepormascounter){ |
@@ -15,32 +15,32 @@ discard block |
||
15 | 15 | { |
16 | 16 | public function epormas() |
17 | 17 | { |
18 | - //Pegawai Epormas |
|
19 | - $grafikepormascounter = DB::table('epormas_counter') |
|
18 | + //Pegawai Epormas |
|
19 | + $grafikepormascounter = DB::table('epormas_counter') |
|
20 | 20 | ->select('tahun','bulan','city_id', DB::raw('SUM(count) as count')) |
21 | 21 | ->whereNull('deleted_at')->groupBy('tahun','bulan','city_id')->orderBy('bulan')->get(); |
22 | - $grafiktahunepormascounter = DB::table('epormas_counter') |
|
22 | + $grafiktahunepormascounter = DB::table('epormas_counter') |
|
23 | 23 | ->select('tahun', DB::raw('SUM(count) as count')) |
24 | 24 | ->whereNull('deleted_at')->groupBy('tahun')->orderBy('tahun')->get(); |
25 | 25 | |
26 | - $namaBulan = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); |
|
27 | - $namaBulans = array('Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'); |
|
28 | - $city = EpormasCity::all(); |
|
29 | - $category = EpormasCategory::all(); |
|
30 | - $countcity = count($city); |
|
31 | - $countcategory = count($category); |
|
26 | + $namaBulan = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); |
|
27 | + $namaBulans = array('Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'); |
|
28 | + $city = EpormasCity::all(); |
|
29 | + $category = EpormasCategory::all(); |
|
30 | + $countcity = count($city); |
|
31 | + $countcategory = count($category); |
|
32 | 32 | |
33 | - $countgrafikepormascounter = count($grafikepormascounter); |
|
34 | - $countgrafiktahunepormascounter = count($grafiktahunepormascounter); |
|
35 | - $datagrafikepormascounter = []; |
|
36 | - $datagrafiktahunepormascounter = []; |
|
37 | - $datagrafikcountepormascounter = []; |
|
38 | - $datagrafiktotalepormascounter = []; |
|
39 | - $grafikcountepormascounter = []; |
|
40 | - $grafikbulanepormascounter = []; |
|
41 | - $grafiktotalepormascounter = []; |
|
42 | - $grafikpieepormascounter = []; |
|
43 | - for($q=0; $q<$countgrafiktahunepormascounter; $q++){ |
|
33 | + $countgrafikepormascounter = count($grafikepormascounter); |
|
34 | + $countgrafiktahunepormascounter = count($grafiktahunepormascounter); |
|
35 | + $datagrafikepormascounter = []; |
|
36 | + $datagrafiktahunepormascounter = []; |
|
37 | + $datagrafikcountepormascounter = []; |
|
38 | + $datagrafiktotalepormascounter = []; |
|
39 | + $grafikcountepormascounter = []; |
|
40 | + $grafikbulanepormascounter = []; |
|
41 | + $grafiktotalepormascounter = []; |
|
42 | + $grafikpieepormascounter = []; |
|
43 | + for($q=0; $q<$countgrafiktahunepormascounter; $q++){ |
|
44 | 44 | $tahungrafikepormascounter = $grafiktahunepormascounter[$q]->tahun; |
45 | 45 | $gcountepormascounter = (int)$grafiktahunepormascounter[$q]->count; |
46 | 46 | $totaldataepormascounter = $gcountepormascounter; |
@@ -50,47 +50,47 @@ discard block |
||
50 | 50 | |
51 | 51 | for($kota=1; $kota<=$countcity; $kota++){ |
52 | 52 | for ($index=0; $index<12; $index++) { |
53 | - $grafikcountepormascounter[$q][$kota][$index] = 0; |
|
54 | - $grafikbulanepormascounter[$q][$kota][$index] = 0; |
|
55 | - $grafiktotalepormascounter[$q][$kota][$index] = 0; |
|
56 | - $grafikpieepormascounter[$q][$kota][$index] = ['value'=>0,'name'=>$namaBulan[$index]]; |
|
57 | - $totaldatagrafikepormascounter[$q][$index] = 0; |
|
53 | + $grafikcountepormascounter[$q][$kota][$index] = 0; |
|
54 | + $grafikbulanepormascounter[$q][$kota][$index] = 0; |
|
55 | + $grafiktotalepormascounter[$q][$kota][$index] = 0; |
|
56 | + $grafikpieepormascounter[$q][$kota][$index] = ['value'=>0,'name'=>$namaBulan[$index]]; |
|
57 | + $totaldatagrafikepormascounter[$q][$index] = 0; |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | for($r=0; $r<$countgrafikepormascounter; $r++){ |
61 | - $tahunsepormascounter = $grafikepormascounter[$r]->tahun; |
|
62 | - $bulansepormascounter = $grafikepormascounter[$r]->bulan; |
|
63 | - $city_id = $grafikepormascounter[$r]->city_id; |
|
64 | - if($bulansepormascounter < 10){ |
|
61 | + $tahunsepormascounter = $grafikepormascounter[$r]->tahun; |
|
62 | + $bulansepormascounter = $grafikepormascounter[$r]->bulan; |
|
63 | + $city_id = $grafikepormascounter[$r]->city_id; |
|
64 | + if($bulansepormascounter < 10){ |
|
65 | 65 | $bulanepormascounter = substr($bulansepormascounter,1); |
66 | - }else { |
|
66 | + }else { |
|
67 | 67 | $bulanepormascounter = $bulansepormascounter; |
68 | - } |
|
69 | - if($tahungrafikepormascounter == $tahunsepormascounter){ |
|
70 | - $totaldatagrafikepormascounter[$q][$bulanepormascounter-1] += $grafikepormascounter[$r]->count; |
|
71 | - } |
|
68 | + } |
|
69 | + if($tahungrafikepormascounter == $tahunsepormascounter){ |
|
70 | + $totaldatagrafikepormascounter[$q][$bulanepormascounter-1] += $grafikepormascounter[$r]->count; |
|
71 | + } |
|
72 | 72 | } |
73 | 73 | for($r=0; $r<$countgrafikepormascounter; $r++){ |
74 | - $tahunsepormascounter = $grafikepormascounter[$r]->tahun; |
|
75 | - $bulansepormascounter = $grafikepormascounter[$r]->bulan; |
|
76 | - $city_id = $grafikepormascounter[$r]->city_id; |
|
77 | - if($bulansepormascounter < 10){ |
|
74 | + $tahunsepormascounter = $grafikepormascounter[$r]->tahun; |
|
75 | + $bulansepormascounter = $grafikepormascounter[$r]->bulan; |
|
76 | + $city_id = $grafikepormascounter[$r]->city_id; |
|
77 | + if($bulansepormascounter < 10){ |
|
78 | 78 | $bulanepormascounter = substr($bulansepormascounter,1); |
79 | - }else { |
|
79 | + }else { |
|
80 | 80 | $bulanepormascounter = $bulansepormascounter; |
81 | - } |
|
82 | - if($tahungrafikepormascounter == $tahunsepormascounter){ |
|
83 | - $grafikcountepormascounter[$q][$city_id][$bulanepormascounter-1] = (int)$grafikepormascounter[$r]->count; |
|
84 | - $grafikbulanepormascounter[$q][$city_id][$bulanepormascounter-1] = $grafikepormascounter[$r]->bulan; |
|
85 | - $totaldatagrafikepormascounters = $totaldatagrafikepormascounter[$q][$bulanepormascounter-1]; |
|
86 | - $grafiktotalepormascounter[$q][$city_id][$bulanepormascounter-1] = $totaldatagrafikepormascounters; |
|
87 | - $grafikpieepormascounter[$q][$city_id][$bulanepormascounter-1] = ['value'=>$totaldatagrafikepormascounters,'name'=>$namaBulan[$bulanepormascounter-1]]; |
|
88 | - } |
|
81 | + } |
|
82 | + if($tahungrafikepormascounter == $tahunsepormascounter){ |
|
83 | + $grafikcountepormascounter[$q][$city_id][$bulanepormascounter-1] = (int)$grafikepormascounter[$r]->count; |
|
84 | + $grafikbulanepormascounter[$q][$city_id][$bulanepormascounter-1] = $grafikepormascounter[$r]->bulan; |
|
85 | + $totaldatagrafikepormascounters = $totaldatagrafikepormascounter[$q][$bulanepormascounter-1]; |
|
86 | + $grafiktotalepormascounter[$q][$city_id][$bulanepormascounter-1] = $totaldatagrafikepormascounters; |
|
87 | + $grafikpieepormascounter[$q][$city_id][$bulanepormascounter-1] = ['value'=>$totaldatagrafikepormascounters,'name'=>$namaBulan[$bulanepormascounter-1]]; |
|
88 | + } |
|
89 | + } |
|
89 | 90 | } |
90 | - } |
|
91 | - $chartgrafikcountepormascounter = ['chartdata'=>$grafikcountepormascounter]; |
|
92 | - $datagrafikepormascounter = ['count'=>$grafikcountepormascounter, 'bulan'=>$grafikbulanepormascounter, 'namabulan'=>$namaBulan, 'namabulans'=>$namaBulans, 'kategori'=>$category, 'kota'=>$city, 'total'=>$grafiktotalepormascounter, 'datatahun'=>['tahun'=>$datagrafiktahunepormascounter, 'count'=>$datagrafikcountepormascounter, 'totaldata'=>$datagrafiktotalepormascounter], 'datapie'=>$grafikpieepormascounter, 'seriesdata'=>[$chartgrafikcountepormascounter]]; |
|
93 | - //end Pegawai Epormas |
|
91 | + $chartgrafikcountepormascounter = ['chartdata'=>$grafikcountepormascounter]; |
|
92 | + $datagrafikepormascounter = ['count'=>$grafikcountepormascounter, 'bulan'=>$grafikbulanepormascounter, 'namabulan'=>$namaBulan, 'namabulans'=>$namaBulans, 'kategori'=>$category, 'kota'=>$city, 'total'=>$grafiktotalepormascounter, 'datatahun'=>['tahun'=>$datagrafiktahunepormascounter, 'count'=>$datagrafikcountepormascounter, 'totaldata'=>$datagrafiktotalepormascounter], 'datapie'=>$grafikpieepormascounter, 'seriesdata'=>[$chartgrafikcountepormascounter]]; |
|
93 | + //end Pegawai Epormas |
|
94 | 94 | |
95 | 95 | return Response::json(array( |
96 | 96 | //Jumlah Penduduk |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('epormas')) { |
|
3 | +if (!function_exists('epormas')) { |
|
4 | 4 | function epormas() |
5 | 5 | { |
6 | 6 | return 'Welcome to function epormas() for Dashboard\Epormas package'; |
@@ -6,25 +6,25 @@ |
||
6 | 6 | |
7 | 7 | class CreateEpormasCounterTable extends Migration { |
8 | 8 | |
9 | - public function up() |
|
10 | - { |
|
11 | - Schema::create('epormas_counter', function(Blueprint $table) { |
|
12 | - $table->increments('id'); |
|
13 | - $table->timestamps(); |
|
14 | - $table->softDeletes(); |
|
15 | - $table->integer('tahun')->unsigned()->index(); |
|
16 | - $table->string('bulan', 2)->index(); |
|
17 | - $table->datetime('tanggal')->index(); |
|
18 | - $table->integer('count')->unsigned()->index(); |
|
19 | - $table->string('via')->index(); |
|
20 | - $table->integer('user_id')->unsigned()->index(); |
|
21 | - $table->integer('category_id')->unsigned()->index(); |
|
22 | - $table->integer('city_id')->unsigned()->index(); |
|
23 | - }); |
|
24 | - } |
|
9 | + public function up() |
|
10 | + { |
|
11 | + Schema::create('epormas_counter', function(Blueprint $table) { |
|
12 | + $table->increments('id'); |
|
13 | + $table->timestamps(); |
|
14 | + $table->softDeletes(); |
|
15 | + $table->integer('tahun')->unsigned()->index(); |
|
16 | + $table->string('bulan', 2)->index(); |
|
17 | + $table->datetime('tanggal')->index(); |
|
18 | + $table->integer('count')->unsigned()->index(); |
|
19 | + $table->string('via')->index(); |
|
20 | + $table->integer('user_id')->unsigned()->index(); |
|
21 | + $table->integer('category_id')->unsigned()->index(); |
|
22 | + $table->integer('city_id')->unsigned()->index(); |
|
23 | + }); |
|
24 | + } |
|
25 | 25 | |
26 | - public function down() |
|
27 | - { |
|
28 | - Schema::dropIfExists('epormas_counter'); |
|
29 | - } |
|
26 | + public function down() |
|
27 | + { |
|
28 | + Schema::dropIfExists('epormas_counter'); |
|
29 | + } |
|
30 | 30 | } |
@@ -6,18 +6,18 @@ |
||
6 | 6 | |
7 | 7 | class CreateEpormasCityTable extends Migration { |
8 | 8 | |
9 | - public function up() |
|
10 | - { |
|
11 | - Schema::create('epormas_city', function(Blueprint $table) { |
|
12 | - $table->increments('id'); |
|
13 | - $table->timestamps(); |
|
14 | - $table->softDeletes(); |
|
15 | - $table->string('name', 191)->index(); |
|
16 | - }); |
|
17 | - } |
|
9 | + public function up() |
|
10 | + { |
|
11 | + Schema::create('epormas_city', function(Blueprint $table) { |
|
12 | + $table->increments('id'); |
|
13 | + $table->timestamps(); |
|
14 | + $table->softDeletes(); |
|
15 | + $table->string('name', 191)->index(); |
|
16 | + }); |
|
17 | + } |
|
18 | 18 | |
19 | - public function down() |
|
20 | - { |
|
21 | - Schema::dropIfExists('epormas_city'); |
|
22 | - } |
|
19 | + public function down() |
|
20 | + { |
|
21 | + Schema::dropIfExists('epormas_city'); |
|
22 | + } |
|
23 | 23 | } |
@@ -6,18 +6,18 @@ |
||
6 | 6 | |
7 | 7 | class CreateEpormasCategoryTable extends Migration { |
8 | 8 | |
9 | - public function up() |
|
10 | - { |
|
11 | - Schema::create('epormas_category', function(Blueprint $table) { |
|
12 | - $table->increments('id'); |
|
13 | - $table->timestamps(); |
|
14 | - $table->softDeletes(); |
|
15 | - $table->string('name', 191)->index(); |
|
16 | - }); |
|
17 | - } |
|
9 | + public function up() |
|
10 | + { |
|
11 | + Schema::create('epormas_category', function(Blueprint $table) { |
|
12 | + $table->increments('id'); |
|
13 | + $table->timestamps(); |
|
14 | + $table->softDeletes(); |
|
15 | + $table->string('name', 191)->index(); |
|
16 | + }); |
|
17 | + } |
|
18 | 18 | |
19 | - public function down() |
|
20 | - { |
|
21 | - Schema::dropIfExists('epormas_category'); |
|
22 | - } |
|
19 | + public function down() |
|
20 | + { |
|
21 | + Schema::dropIfExists('epormas_category'); |
|
22 | + } |
|
23 | 23 | } |
@@ -5,34 +5,34 @@ |
||
5 | 5 | |
6 | 6 | class EpormasCityTableSeeder extends Seeder { |
7 | 7 | |
8 | - public function run() |
|
9 | - { |
|
10 | - //DB::table('epormas_city')->delete(); |
|
8 | + public function run() |
|
9 | + { |
|
10 | + //DB::table('epormas_city')->delete(); |
|
11 | 11 | |
12 | - // create_epormas_city_20171201000000 |
|
13 | - EpormasCity::create(array( |
|
14 | - 'name' => 'Kabupaten Pandeglang' |
|
15 | - )); |
|
16 | - EpormasCity::create(array( |
|
17 | - 'name' => 'Kabupaten Lebak' |
|
18 | - )); |
|
19 | - EpormasCity::create(array( |
|
20 | - 'name' => 'Kabupaten Tangerang' |
|
21 | - )); |
|
22 | - EpormasCity::create(array( |
|
23 | - 'name' => 'Kabupaten Serang' |
|
24 | - )); |
|
25 | - EpormasCity::create(array( |
|
26 | - 'name' => 'Kota Tangerang' |
|
27 | - )); |
|
28 | - EpormasCity::create(array( |
|
29 | - 'name' => 'Kota Cilegon' |
|
30 | - )); |
|
31 | - EpormasCity::create(array( |
|
32 | - 'name' => 'Kota Serang' |
|
33 | - )); |
|
34 | - EpormasCity::create(array( |
|
35 | - 'name' => 'Kota Tangerang Selatan' |
|
36 | - )); |
|
37 | - } |
|
12 | + // create_epormas_city_20171201000000 |
|
13 | + EpormasCity::create(array( |
|
14 | + 'name' => 'Kabupaten Pandeglang' |
|
15 | + )); |
|
16 | + EpormasCity::create(array( |
|
17 | + 'name' => 'Kabupaten Lebak' |
|
18 | + )); |
|
19 | + EpormasCity::create(array( |
|
20 | + 'name' => 'Kabupaten Tangerang' |
|
21 | + )); |
|
22 | + EpormasCity::create(array( |
|
23 | + 'name' => 'Kabupaten Serang' |
|
24 | + )); |
|
25 | + EpormasCity::create(array( |
|
26 | + 'name' => 'Kota Tangerang' |
|
27 | + )); |
|
28 | + EpormasCity::create(array( |
|
29 | + 'name' => 'Kota Cilegon' |
|
30 | + )); |
|
31 | + EpormasCity::create(array( |
|
32 | + 'name' => 'Kota Serang' |
|
33 | + )); |
|
34 | + EpormasCity::create(array( |
|
35 | + 'name' => 'Kota Tangerang Selatan' |
|
36 | + )); |
|
37 | + } |
|
38 | 38 | } |
@@ -5,13 +5,13 @@ |
||
5 | 5 | |
6 | 6 | class EpormasCategoryTableSeeder extends Seeder { |
7 | 7 | |
8 | - public function run() |
|
9 | - { |
|
10 | - //DB::table('epormas_category')->delete(); |
|
8 | + public function run() |
|
9 | + { |
|
10 | + //DB::table('epormas_category')->delete(); |
|
11 | 11 | |
12 | - // create_epormas_category_20171201000000 |
|
13 | - EpormasCategory::create(array( |
|
14 | - 'name' => 'Pendidikan' |
|
15 | - )); |
|
16 | - } |
|
12 | + // create_epormas_category_20171201000000 |
|
13 | + EpormasCategory::create(array( |
|
14 | + 'name' => 'Pendidikan' |
|
15 | + )); |
|
16 | + } |
|
17 | 17 | } |