Completed
Push — 1.1 ( c52a58...5ae4e1 )
by
unknown
9s
created
src/LaravelOpdServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@
 block discarded – undo
42 42
      */
43 43
     public function register()
44 44
     {
45
-        $this->app->singleton('laravel-opd', function ($app) {
45
+        $this->app->singleton('laravel-opd', function($app) {
46 46
             return new LaravelOpd;
47 47
         });
48 48
 
49
-        $this->app->singleton('command.laravel-opd', function ($app) {
49
+        $this->app->singleton('command.laravel-opd', function($app) {
50 50
             return new LaravelOpdCommand;
51 51
         });
52 52
 
Please login to merge, or discard this patch.
src/helpers/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('laravelOpd')) {
3
+if (!function_exists('laravelOpd')) {
4 4
     function laravelOpd()
5 5
     {
6 6
         return 'Welcome to function laravelOpd() for Bantenprov\LaravelOpd package';
Please login to merge, or discard this patch.
src/LaravelOpd.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function index()
28 28
     {
29
-        return $opds = LaravelOpdModel::orderBy('kunker','asc')->get();                
29
+        return $opds = LaravelOpdModel::orderBy('kunker', 'asc')->get();                
30 30
 
31 31
         //return view('unit_kerja.index',compact('opds'));
32 32
         
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $nodes = LaravelOpdModel::get()->toTree();
38 38
         
39
-        $traverse = function ($categories, $prefix = '-') use (&$traverse) {
39
+        $traverse = function($categories, $prefix = '-') use (&$traverse) {
40 40
             foreach ($categories as $category) {
41 41
                 echo $prefix.' '.$category->kunker.' - '.$category->name.' - ['.$category->npej.']<br>';
42 42
         
@@ -62,16 +62,16 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function addChild($id)
64 64
     {
65
-        return $unit_kerja = LaravelOpdModel::where('id',$id)->first();
65
+        return $unit_kerja = LaravelOpdModel::where('id', $id)->first();
66 66
 
67 67
         //return view('unit_kerja.add-child',compact('unit_kerja'));
68 68
     }
69 69
     
70 70
     public function storeRoot($request = array())
71 71
     {        
72
-        $check_root = LaravelOpdModel::where('id',$request->root);
72
+        $check_root = LaravelOpdModel::where('id', $request->root);
73 73
         
74
-        if($check_root->first()->isEmpty())
74
+        if ($check_root->first()->isEmpty())
75 75
         {                        
76 76
 
77 77
             $unit_kerja = LaravelOpdModel::create([
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
     public function storeChild($request = array())
98 98
     {
99
-        $check_root = LaravelOpdModel::where('id',$request->root);
99
+        $check_root = LaravelOpdModel::where('id', $request->root);
100 100
                           
101 101
             $check_root->first()->children()->create([
102 102
                 'kunker' => $request->c_kunker,
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@
 block discarded – undo
83 83
                 'npej' => $request->npej,
84 84
                 'njab' => $request->njab
85 85
             ]);
86
-        }
87
-        else
86
+        } else
88 87
         {
89 88
             return redirect()->back();
90 89
         }
Please login to merge, or discard this patch.
src/database/migrations/2017_11_08_053023_create_laravel_opd_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public function up()
16 16
     {
17
-        Schema::create('opd', function (Blueprint $table) {
17
+        Schema::create('opd', function(Blueprint $table) {
18 18
             //$table->increments('id');
19 19
             $table->uuid('id')->unique();
20 20
             $table->primary('id');
Please login to merge, or discard this patch.
src/Models/LaravelOpdModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     
20 20
 
21 21
     protected $table = "opd";
22
-    protected $fillable = ['kunker','name','kunker_sinjab','kunker_simral','levelunker','njab','npej'];
22
+    protected $fillable = ['kunker', 'name', 'kunker_sinjab', 'kunker_simral', 'levelunker', 'njab', 'npej'];
23 23
     protected $hidden = [];
24 24
     public $incrementing = false;
25 25
 }
Please login to merge, or discard this patch.
src/Http/Controllers/LaravelOpdController.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@
 block discarded – undo
74 74
                 'njab' => $request->njab,
75 75
                 'npej' => $request->npej
76 76
             ]);
77
-        }
78
-        else
77
+        } else
79 78
         {
80 79
             return redirect()->back();
81 80
         }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
     public function index()
23 23
     {
24 24
 
25
-        $opds = LaravelOpdModel::orderBy('kunker','asc')->get();                
25
+        $opds = LaravelOpdModel::orderBy('kunker', 'asc')->get();                
26 26
 
27 27
         $nodes = LaravelOpdModel::get()->toTree();
28 28
 
29
-        $traverse = function ($categories, $prefix = '-') use (&$traverse) {
29
+        $traverse = function($categories, $prefix = '-') use (&$traverse) {
30 30
             foreach ($categories as $category) {
31 31
                 echo $prefix.' '.$category->kunker.' - '.$category->name.'<br>';
32 32
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $traverse($nodes);
38 38
 
39 39
 
40
-        return view('laravel-opd::unit_kerja.index',compact('opds'));
40
+        return view('laravel-opd::unit_kerja.index', compact('opds'));
41 41
         
42 42
     }
43 43
 
@@ -51,21 +51,21 @@  discard block
 block discarded – undo
51 51
     {
52 52
         $unit_kerjas = LaravelOpdModel::all();
53 53
 
54
-        return view('laravel-opd::unit_kerja.create-child',compact('unit_kerjas'));
54
+        return view('laravel-opd::unit_kerja.create-child', compact('unit_kerjas'));
55 55
     }
56 56
 
57 57
     public function addChild($id)
58 58
     {
59
-        $unit_kerja = LaravelOpdModel::where('id',$id)->first();
59
+        $unit_kerja = LaravelOpdModel::where('id', $id)->first();
60 60
 
61
-        return view('laravel-opd::unit_kerja.add-child',compact('unit_kerja'));
61
+        return view('laravel-opd::unit_kerja.add-child', compact('unit_kerja'));
62 62
     }
63 63
 
64 64
     public function storeRoot(Request $request)
65 65
     {
66
-        $check_root = LaravelOpdModel::where('id',$request->root);
66
+        $check_root = LaravelOpdModel::where('id', $request->root);
67 67
 
68
-        if($check_root->get()->isEmpty())
68
+        if ($check_root->get()->isEmpty())
69 69
         {
70 70
             $unit_kerja = LaravelOpdModel::create([
71 71
                 'kunker' => $request->kunker,
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     public function storeChild(Request $request)
90 90
     {
91
-        $check_root = LaravelOpdModel::where('id',$request->root);
91
+        $check_root = LaravelOpdModel::where('id', $request->root);
92 92
 
93 93
             $check_root->first()->children()->create([
94 94
                 'kunker' => $request->c_kunker,
Please login to merge, or discard this patch.