Completed
Push — master ( a877ca...503ff2 )
by Sherif
08:12
created
src/Modules/V1/Core/Http/Controllers/SettingsController.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,20 +8,20 @@
 block discarded – undo
8 8
 
9 9
 class SettingsController extends BaseApiController
10 10
 {
11
-    /**
12
-     * The name of the model that is used by the base api controller 
13
-     * to preform actions like (add, edit ... etc).
14
-     * @var string
15
-     */
16
-    protected $model               = 'settings';
11
+	/**
12
+	 * The name of the model that is used by the base api controller 
13
+	 * to preform actions like (add, edit ... etc).
14
+	 * @var string
15
+	 */
16
+	protected $model               = 'settings';
17 17
 
18
-    /**
19
-     * The validations rules used by the base api controller
20
-     * to check before add.
21
-     * @var array
22
-     */
23
-    protected $validationRules  = [
24
-    'name'  => 'required|string|max:100',
25
-    'value' => 'required|string|max:100'
26
-    ];
18
+	/**
19
+	 * The validations rules used by the base api controller
20
+	 * to check before add.
21
+	 * @var array
22
+	 */
23
+	protected $validationRules  = [
24
+	'name'  => 'required|string|max:100',
25
+	'value' => 'required|string|max:100'
26
+	];
27 27
 }
Please login to merge, or discard this patch.
V1/Reporting/Database/Migrations/2016_01_19_112603_sampel_report.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,15 +22,15 @@
 block discarded – undo
22 22
 			");
23 23
 		
24 24
 		DB::table('reports')->insert(
25
-        	[
26
-	        	[
25
+			[
26
+				[
27 27
 				'report_name' => 'admin_count',
28 28
 				'view_name'   => 'admin_count',
29 29
 				'created_at'  => \DB::raw('NOW()'),
30 30
 				'updated_at'  => \DB::raw('NOW()')
31
-	        	]
32
-        	]
33
-        );
31
+				]
32
+			]
33
+		);
34 34
 	}
35 35
 
36 36
 	/**
Please login to merge, or discard this patch.
src/Modules/V1/Reporting/Database/Migrations/2016_01_19_112350_reports.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 			$table->string('view_name',100);
19 19
 			$table->softDeletes();
20 20
 			$table->timestamps();
21
-        });
21
+		});
22 22
 	}
23 23
 
24 24
 	/**
Please login to merge, or discard this patch.
Modules/V1/Reporting/Database/Migrations/2016_01_24_123631_initialize.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -12,71 +12,71 @@
 block discarded – undo
12 12
 	 */
13 13
 	public function up()
14 14
 	{
15
-        /**
16
-         * Delete previous permissions.
17
-         */
15
+		/**
16
+		 * Delete previous permissions.
17
+		 */
18 18
 		DB::table('permissions')->whereIn('model', ['reports'])->delete();
19 19
 
20 20
 		/**
21
-         * Insert the permissions related to this module.
22
-         */
23
-        DB::table('permissions')->insert(
24
-        	[
25
-        		/**
26
-        		 * Reporting model permissions.
27
-        		 */
28
-	        	[
29
-	        	'name'       => 'find',
30
-	        	'model'      => 'reports',
31
-	        	'created_at' => \DB::raw('NOW()'),
32
-	        	'updated_at' => \DB::raw('NOW()')
33
-	        	],
34
-	        	[
35
-	        	'name'       => 'search',
36
-	        	'model'      => 'reports',
37
-	        	'created_at' => \DB::raw('NOW()'),
38
-	        	'updated_at' => \DB::raw('NOW()')
39
-	        	],
40
-	        	[
41
-	        	'name'       => 'list',
42
-	        	'model'      => 'reports',
43
-	        	'created_at' => \DB::raw('NOW()'),
44
-	        	'updated_at' => \DB::raw('NOW()')
45
-	        	],
46
-	        	[
47
-	        	'name'       => 'findby',
48
-	        	'model'      => 'reports',
49
-	        	'created_at' => \DB::raw('NOW()'),
50
-	        	'updated_at' => \DB::raw('NOW()')
51
-	        	],
52
-	        	[
53
-	        	'name'       => 'first',
54
-	        	'model'      => 'reports',
55
-	        	'created_at' => \DB::raw('NOW()'),
56
-	        	'updated_at' => \DB::raw('NOW()')
57
-	        	],
58
-	        	[
59
-	        	'name'       => 'paginate',
60
-	        	'model'      => 'reports',
61
-	        	'created_at' => \DB::raw('NOW()'),
62
-	        	'updated_at' => \DB::raw('NOW()')
63
-	        	],
64
-	        	[
65
-	        	'name'       => 'paginateby',
66
-	        	'model'      => 'reports',
67
-	        	'created_at' => \DB::raw('NOW()'),
68
-	        	'updated_at' => \DB::raw('NOW()')
69
-	        	],
70
-	        	[
71
-	        	'name'       => 'admin_count',
72
-	        	'model'      => 'reports',
73
-	        	'created_at' => \DB::raw('NOW()'),
74
-	        	'updated_at' => \DB::raw('NOW()')
75
-	        	]
76
-        	]
77
-        );
21
+		 * Insert the permissions related to this module.
22
+		 */
23
+		DB::table('permissions')->insert(
24
+			[
25
+				/**
26
+				 * Reporting model permissions.
27
+				 */
28
+				[
29
+				'name'       => 'find',
30
+				'model'      => 'reports',
31
+				'created_at' => \DB::raw('NOW()'),
32
+				'updated_at' => \DB::raw('NOW()')
33
+				],
34
+				[
35
+				'name'       => 'search',
36
+				'model'      => 'reports',
37
+				'created_at' => \DB::raw('NOW()'),
38
+				'updated_at' => \DB::raw('NOW()')
39
+				],
40
+				[
41
+				'name'       => 'list',
42
+				'model'      => 'reports',
43
+				'created_at' => \DB::raw('NOW()'),
44
+				'updated_at' => \DB::raw('NOW()')
45
+				],
46
+				[
47
+				'name'       => 'findby',
48
+				'model'      => 'reports',
49
+				'created_at' => \DB::raw('NOW()'),
50
+				'updated_at' => \DB::raw('NOW()')
51
+				],
52
+				[
53
+				'name'       => 'first',
54
+				'model'      => 'reports',
55
+				'created_at' => \DB::raw('NOW()'),
56
+				'updated_at' => \DB::raw('NOW()')
57
+				],
58
+				[
59
+				'name'       => 'paginate',
60
+				'model'      => 'reports',
61
+				'created_at' => \DB::raw('NOW()'),
62
+				'updated_at' => \DB::raw('NOW()')
63
+				],
64
+				[
65
+				'name'       => 'paginateby',
66
+				'model'      => 'reports',
67
+				'created_at' => \DB::raw('NOW()'),
68
+				'updated_at' => \DB::raw('NOW()')
69
+				],
70
+				[
71
+				'name'       => 'admin_count',
72
+				'model'      => 'reports',
73
+				'created_at' => \DB::raw('NOW()'),
74
+				'updated_at' => \DB::raw('NOW()')
75
+				]
76
+			]
77
+		);
78 78
 
79
-        /**
79
+		/**
80 80
 		 * Assign the permissions to the admin group.
81 81
 		 */
82 82
 		$permissionIds = DB::table('permissions')->whereIn('model', ['reports'])->select('id')->lists('id');
Please login to merge, or discard this patch.
src/Modules/V1/Reporting/ModelObservers/ReprotObserver.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -5,44 +5,44 @@
 block discarded – undo
5 5
  */
6 6
 class LogObserver {
7 7
 
8
-    public function saving($model)
9
-    {
10
-        //
11
-    }
12
-
13
-    public function saved($model)
14
-    {
15
-        //
16
-    }
17
-
18
-    public function creating($model)
19
-    {
20
-        //
21
-    }
22
-
23
-    public function created($model)
24
-    {
25
-        //
26
-    }
27
-
28
-    public function updating($model)
29
-    {
30
-        //
31
-    }
32
-
33
-    public function updated($model)
34
-    {
35
-        //
36
-    }
37
-
38
-    public function deleting($model)
39
-    {
40
-        //
41
-    }
42
-
43
-    public function deleted($model)
44
-    {
45
-        //
46
-    }
8
+	public function saving($model)
9
+	{
10
+		//
11
+	}
12
+
13
+	public function saved($model)
14
+	{
15
+		//
16
+	}
17
+
18
+	public function creating($model)
19
+	{
20
+		//
21
+	}
22
+
23
+	public function created($model)
24
+	{
25
+		//
26
+	}
27
+
28
+	public function updating($model)
29
+	{
30
+		//
31
+	}
32
+
33
+	public function updated($model)
34
+	{
35
+		//
36
+	}
37
+
38
+	public function deleting($model)
39
+	{
40
+		//
41
+	}
42
+
43
+	public function deleted($model)
44
+	{
45
+		//
46
+	}
47 47
 
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
src/Modules/V1/Reporting/Http/Controllers/ReportsController.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,16 +8,16 @@
 block discarded – undo
8 8
 class ReportsController extends BaseApiController
9 9
 {
10 10
 	/**
11
-     * The name of the model that is used by the base api controller 
12
-     * to preform actions like (add, edit ... etc).
13
-     * @var string
14
-     */
15
-    protected $model            = 'reports';
11
+	 * The name of the model that is used by the base api controller 
12
+	 * to preform actions like (add, edit ... etc).
13
+	 * @var string
14
+	 */
15
+	protected $model            = 'reports';
16 16
 
17
-    /**
18
-     * List of all route actions that the base api controller
19
-     * will skip permissions check for them.
20
-     * @var array
21
-     */
22
-    protected $skipPermissionCheck = ['find', 'first'];
17
+	/**
18
+	 * List of all route actions that the base api controller
19
+	 * will skip permissions check for them.
20
+	 * @var array
21
+	 */
22
+	protected $skipPermissionCheck = ['find', 'first'];
23 23
 }
Please login to merge, or discard this patch.
src/Modules/V1/Reporting/Report.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 
6 6
 class Report extends Model{
7 7
 
8
-    use SoftDeletes;
8
+	use SoftDeletes;
9 9
 	protected $table    = 'reports';
10 10
 	protected $dates    = ['created_at', 'updated_at', 'deleted_at'];
11 11
 	protected $hidden   = ['deleted_at'];
@@ -13,23 +13,23 @@  discard block
 block discarded – undo
13 13
 	protected $fillable = ['report_name', 'view_name'];
14 14
 
15 15
 	public function getCreatedAtAttribute($value)
16
-    {
17
-        return \Carbon\Carbon::parse($value)->addHours(\Session::get('timeZoneDiff'))->toDateTimeString();
18
-    }
16
+	{
17
+		return \Carbon\Carbon::parse($value)->addHours(\Session::get('timeZoneDiff'))->toDateTimeString();
18
+	}
19 19
 
20
-    public function getUpdatedAtAttribute($value)
21
-    {
22
-        return \Carbon\Carbon::parse($value)->addHours(\Session::get('timeZoneDiff'))->toDateTimeString();
23
-    }
20
+	public function getUpdatedAtAttribute($value)
21
+	{
22
+		return \Carbon\Carbon::parse($value)->addHours(\Session::get('timeZoneDiff'))->toDateTimeString();
23
+	}
24 24
 
25
-    public function getDeletedAtAttribute($value)
26
-    {
27
-        return \Carbon\Carbon::parse($value)->addHours(\Session::get('timeZoneDiff'))->toDateTimeString();
28
-    }
25
+	public function getDeletedAtAttribute($value)
26
+	{
27
+		return \Carbon\Carbon::parse($value)->addHours(\Session::get('timeZoneDiff'))->toDateTimeString();
28
+	}
29 29
     
30
-    public static function boot()
31
-    {
32
-        parent::boot();
33
-        parent::observe(\App::make('App\Modules\V1\Reporting\ModelObservers\ReprotObserver'));
34
-    }
30
+	public static function boot()
31
+	{
32
+		parent::boot();
33
+		parent::observe(\App::make('App\Modules\V1\Reporting\ModelObservers\ReprotObserver'));
34
+	}
35 35
 }
Please login to merge, or discard this patch.
V1/Notifications/Database/Migrations/2016_01_24_111941_notifications.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
 		Schema::create('notifications', function (Blueprint $table) {
16 16
 			$table->increments('id');
17 17
 			$table->string('name',100);
18
-            $table->text('description')->nullable();
18
+			$table->text('description')->nullable();
19 19
 			$table->string('item_name',100);
20 20
 			$table->string('item_type',100);
21 21
 			$table->integer('item_id');
22 22
 			$table->boolean('notified');
23 23
 			$table->softDeletes();
24 24
 			$table->timestamps();
25
-        });
25
+		});
26 26
 	}
27 27
 
28 28
 	/**
Please login to merge, or discard this patch.
Database/Migrations/2016_01_24_123631_initialize_notifications.php 1 patch
Indentation   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -12,77 +12,77 @@
 block discarded – undo
12 12
 	 */
13 13
 	public function up()
14 14
 	{
15
-        /**
16
-         * Delete previous permissions.
17
-         */
15
+		/**
16
+		 * Delete previous permissions.
17
+		 */
18 18
 		DB::table('permissions')->whereIn('model', ['notifications'])->delete();
19 19
 
20 20
 		/**
21
-         * Insert the permissions related to this module.
22
-         */
23
-        DB::table('permissions')->insert(
24
-        	[
25
-        		/**
26
-        		 * Logs model permissions.
27
-        		 */
28
-	        	[
29
-	        	'name'       => 'find',
30
-	        	'model'      => 'notifications',
31
-	        	'created_at' => \DB::raw('NOW()'),
32
-	        	'updated_at' => \DB::raw('NOW()')
33
-	        	],
34
-	        	[
35
-	        	'name'       => 'search',
36
-	        	'model'      => 'notifications',
37
-	        	'created_at' => \DB::raw('NOW()'),
38
-	        	'updated_at' => \DB::raw('NOW()')
39
-	        	],
40
-	        	[
41
-	        	'name'       => 'list',
42
-	        	'model'      => 'notifications',
43
-	        	'created_at' => \DB::raw('NOW()'),
44
-	        	'updated_at' => \DB::raw('NOW()')
45
-	        	],
46
-	        	[
47
-	        	'name'       => 'findby',
48
-	        	'model'      => 'notifications',
49
-	        	'created_at' => \DB::raw('NOW()'),
50
-	        	'updated_at' => \DB::raw('NOW()')
51
-	        	],
52
-	        	[
53
-	        	'name'       => 'first',
54
-	        	'model'      => 'notifications',
55
-	        	'created_at' => \DB::raw('NOW()'),
56
-	        	'updated_at' => \DB::raw('NOW()')
57
-	        	],
58
-	        	[
59
-	        	'name'       => 'paginate',
60
-	        	'model'      => 'notifications',
61
-	        	'created_at' => \DB::raw('NOW()'),
62
-	        	'updated_at' => \DB::raw('NOW()')
63
-	        	],
64
-	        	[
65
-	        	'name'       => 'paginateby',
66
-	        	'model'      => 'notifications',
67
-	        	'created_at' => \DB::raw('NOW()'),
68
-	        	'updated_at' => \DB::raw('NOW()')
69
-	        	],
70
-	        	[
71
-	        	'name'       => 'notified',
72
-	        	'model'      => 'notifications',
73
-	        	'created_at' => \DB::raw('NOW()'),
74
-	        	'updated_at' => \DB::raw('NOW()')
75
-	        	],
76
-	        	[
77
-	        	'name'       => 'notifyall',
78
-	        	'model'      => 'notifications',
79
-	        	'created_at' => \DB::raw('NOW()'),
80
-	        	'updated_at' => \DB::raw('NOW()')
81
-	        	],
82
-        	]
83
-        );
21
+		 * Insert the permissions related to this module.
22
+		 */
23
+		DB::table('permissions')->insert(
24
+			[
25
+				/**
26
+				 * Logs model permissions.
27
+				 */
28
+				[
29
+				'name'       => 'find',
30
+				'model'      => 'notifications',
31
+				'created_at' => \DB::raw('NOW()'),
32
+				'updated_at' => \DB::raw('NOW()')
33
+				],
34
+				[
35
+				'name'       => 'search',
36
+				'model'      => 'notifications',
37
+				'created_at' => \DB::raw('NOW()'),
38
+				'updated_at' => \DB::raw('NOW()')
39
+				],
40
+				[
41
+				'name'       => 'list',
42
+				'model'      => 'notifications',
43
+				'created_at' => \DB::raw('NOW()'),
44
+				'updated_at' => \DB::raw('NOW()')
45
+				],
46
+				[
47
+				'name'       => 'findby',
48
+				'model'      => 'notifications',
49
+				'created_at' => \DB::raw('NOW()'),
50
+				'updated_at' => \DB::raw('NOW()')
51
+				],
52
+				[
53
+				'name'       => 'first',
54
+				'model'      => 'notifications',
55
+				'created_at' => \DB::raw('NOW()'),
56
+				'updated_at' => \DB::raw('NOW()')
57
+				],
58
+				[
59
+				'name'       => 'paginate',
60
+				'model'      => 'notifications',
61
+				'created_at' => \DB::raw('NOW()'),
62
+				'updated_at' => \DB::raw('NOW()')
63
+				],
64
+				[
65
+				'name'       => 'paginateby',
66
+				'model'      => 'notifications',
67
+				'created_at' => \DB::raw('NOW()'),
68
+				'updated_at' => \DB::raw('NOW()')
69
+				],
70
+				[
71
+				'name'       => 'notified',
72
+				'model'      => 'notifications',
73
+				'created_at' => \DB::raw('NOW()'),
74
+				'updated_at' => \DB::raw('NOW()')
75
+				],
76
+				[
77
+				'name'       => 'notifyall',
78
+				'model'      => 'notifications',
79
+				'created_at' => \DB::raw('NOW()'),
80
+				'updated_at' => \DB::raw('NOW()')
81
+				],
82
+			]
83
+		);
84 84
 
85
-        /**
85
+		/**
86 86
 		 * Assign the permissions to the admin group.
87 87
 		 */
88 88
 		$permissionIds = DB::table('permissions')->whereIn('model', ['notifications'])->select('id')->lists('id');
Please login to merge, or discard this patch.