Completed
Push — master ( f30158...bfbb50 )
by Sherif
02:18
created
src/Modules/Permissions/ModelObservers/PermissionObserver.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -6,53 +6,53 @@
 block discarded – undo
6 6
 class PermissionObserver
7 7
 {
8 8
 
9
-    public function saving($model)
10
-    {
11
-        //
12
-    }
13
-
14
-    public function saved($model)
15
-    {
16
-        //
17
-    }
18
-
19
-    public function creating($model)
20
-    {
21
-        //
22
-    }
23
-
24
-    public function created($model)
25
-    {
26
-        //
27
-    }
28
-
29
-    public function updating($model)
30
-    {
31
-        //
32
-    }
33
-
34
-    public function updated($model)
35
-    {
36
-        //
37
-    }
38
-
39
-    public function deleting($model)
40
-    {
41
-        //
42
-    }
43
-
44
-    public function deleted($model)
45
-    {
46
-        //
47
-    }
48
-
49
-    public function restoring($model)
50
-    {
51
-        //
52
-    }
53
-
54
-    public function restored($model)
55
-    {
56
-        //
57
-    }
9
+	public function saving($model)
10
+	{
11
+		//
12
+	}
13
+
14
+	public function saved($model)
15
+	{
16
+		//
17
+	}
18
+
19
+	public function creating($model)
20
+	{
21
+		//
22
+	}
23
+
24
+	public function created($model)
25
+	{
26
+		//
27
+	}
28
+
29
+	public function updating($model)
30
+	{
31
+		//
32
+	}
33
+
34
+	public function updated($model)
35
+	{
36
+		//
37
+	}
38
+
39
+	public function deleting($model)
40
+	{
41
+		//
42
+	}
43
+
44
+	public function deleted($model)
45
+	{
46
+		//
47
+	}
48
+
49
+	public function restoring($model)
50
+	{
51
+		//
52
+	}
53
+
54
+	public function restored($model)
55
+	{
56
+		//
57
+	}
58 58
 }
Please login to merge, or discard this patch.
Database/Migrations/2016_06_01_000004_create_oauth_auth_codes_table.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -6,33 +6,33 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthAuthCodesTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('oauth_auth_codes', function (Blueprint $table) {
17
-            $table->string('id', 100)->primary();
18
-            $table->unsignedInteger('user_id');
19
-            $table->unsignedInteger('client_id');
20
-            $table->text('scopes')->nullable();
21
-            $table->boolean('revoked');
22
-            $table->dateTime('expires_at')->nullable();
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('oauth_auth_codes', function (Blueprint $table) {
17
+			$table->string('id', 100)->primary();
18
+			$table->unsignedInteger('user_id');
19
+			$table->unsignedInteger('client_id');
20
+			$table->text('scopes')->nullable();
21
+			$table->boolean('revoked');
22
+			$table->dateTime('expires_at')->nullable();
23 23
 
24
-            $table->foreign('user_id')->references('id')->on('users');
25
-            $table->foreign('client_id')->references('id')->on('oauth_clients');
26
-        });
27
-    }
24
+			$table->foreign('user_id')->references('id')->on('users');
25
+			$table->foreign('client_id')->references('id')->on('oauth_clients');
26
+		});
27
+	}
28 28
 
29
-    /**
30
-     * Reverse the migrations.
31
-     *
32
-     * @return void
33
-     */
34
-    public function down()
35
-    {
36
-        Schema::drop('oauth_auth_codes');
37
-    }
29
+	/**
30
+	 * Reverse the migrations.
31
+	 *
32
+	 * @return void
33
+	 */
34
+	public function down()
35
+	{
36
+		Schema::drop('oauth_auth_codes');
37
+	}
38 38
 }
Please login to merge, or discard this patch.
Database/Migrations/2016_06_01_000001_create_oauth_clients_table.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -6,35 +6,35 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthClientsTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('oauth_clients', function (Blueprint $table) {
17
-            $table->increments('id');
18
-            $table->unsignedInteger('user_id')->nullable();
19
-            $table->string('name');
20
-            $table->string('secret', 100);
21
-            $table->text('redirect');
22
-            $table->boolean('personal_access_client')->default(0);
23
-            $table->boolean('password_client')->default(0);
24
-            $table->boolean('revoked')->default(0);
25
-            $table->timestamps();
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('oauth_clients', function (Blueprint $table) {
17
+			$table->increments('id');
18
+			$table->unsignedInteger('user_id')->nullable();
19
+			$table->string('name');
20
+			$table->string('secret', 100);
21
+			$table->text('redirect');
22
+			$table->boolean('personal_access_client')->default(0);
23
+			$table->boolean('password_client')->default(0);
24
+			$table->boolean('revoked')->default(0);
25
+			$table->timestamps();
26 26
 
27
-            $table->foreign('user_id')->references('id')->on('users');
28
-        });
29
-    }
27
+			$table->foreign('user_id')->references('id')->on('users');
28
+		});
29
+	}
30 30
 
31
-    /**
32
-     * Reverse the migrations.
33
-     *
34
-     * @return void
35
-     */
36
-    public function down()
37
-    {
38
-        Schema::drop('oauth_clients');
39
-    }
31
+	/**
32
+	 * Reverse the migrations.
33
+	 *
34
+	 * @return void
35
+	 */
36
+	public function down()
37
+	{
38
+		Schema::drop('oauth_clients');
39
+	}
40 40
 }
Please login to merge, or discard this patch.
Database/Migrations/2016_06_01_000002_create_oauth_access_tokens_table.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -6,35 +6,35 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthAccessTokensTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('oauth_access_tokens', function (Blueprint $table) {
17
-            $table->string('id', 100)->primary();
18
-            $table->unsignedInteger('user_id')->nullable();
19
-            $table->unsignedInteger('client_id');
20
-            $table->string('name')->nullable();
21
-            $table->text('scopes')->nullable();
22
-            $table->boolean('revoked');
23
-            $table->timestamps();
24
-            $table->dateTime('expires_at')->nullable();
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('oauth_access_tokens', function (Blueprint $table) {
17
+			$table->string('id', 100)->primary();
18
+			$table->unsignedInteger('user_id')->nullable();
19
+			$table->unsignedInteger('client_id');
20
+			$table->string('name')->nullable();
21
+			$table->text('scopes')->nullable();
22
+			$table->boolean('revoked');
23
+			$table->timestamps();
24
+			$table->dateTime('expires_at')->nullable();
25 25
 
26
-            $table->foreign('user_id')->references('id')->on('users');
27
-            $table->foreign('client_id')->references('id')->on('oauth_clients');
28
-        });
29
-    }
26
+			$table->foreign('user_id')->references('id')->on('users');
27
+			$table->foreign('client_id')->references('id')->on('oauth_clients');
28
+		});
29
+	}
30 30
 
31
-    /**
32
-     * Reverse the migrations.
33
-     *
34
-     * @return void
35
-     */
36
-    public function down()
37
-    {
38
-        Schema::drop('oauth_access_tokens');
39
-    }
31
+	/**
32
+	 * Reverse the migrations.
33
+	 *
34
+	 * @return void
35
+	 */
36
+	public function down()
37
+	{
38
+		Schema::drop('oauth_access_tokens');
39
+	}
40 40
 }
Please login to merge, or discard this patch.
Migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,29 +6,29 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthPersonalAccessClientsTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('oauth_personal_access_clients', function (Blueprint $table) {
17
-            $table->increments('id');
18
-            $table->unsignedInteger('client_id');
19
-            $table->timestamps();
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('oauth_personal_access_clients', function (Blueprint $table) {
17
+			$table->increments('id');
18
+			$table->unsignedInteger('client_id');
19
+			$table->timestamps();
20 20
             
21
-            $table->foreign('client_id')->references('id')->on('oauth_clients');
22
-        });
23
-    }
21
+			$table->foreign('client_id')->references('id')->on('oauth_clients');
22
+		});
23
+	}
24 24
 
25
-    /**
26
-     * Reverse the migrations.
27
-     *
28
-     * @return void
29
-     */
30
-    public function down()
31
-    {
32
-        Schema::drop('oauth_personal_access_clients');
33
-    }
25
+	/**
26
+	 * Reverse the migrations.
27
+	 *
28
+	 * @return void
29
+	 */
30
+	public function down()
31
+	{
32
+		Schema::drop('oauth_personal_access_clients');
33
+	}
34 34
 }
Please login to merge, or discard this patch.
src/Modules/Roles/Routes/api.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 
16 16
 Route::group(['prefix' => 'roles'], function () {
17 17
 
18
-    Route::get('/', 'RoleController@index');
19
-    Route::get('/{id}', 'RoleController@find');
20
-    Route::post('/', 'RoleController@insert');
21
-    Route::put('/', 'RoleController@update');
22
-    Route::delete('/{id}', 'RoleController@delete');
23
-    Route::get('list/deleted', 'RoleController@deleted');
24
-    Route::patch('restore/{id}', 'RoleController@restore');
25
-    Route::post('assign/permissions', 'RoleController@assignPermissions');
18
+	Route::get('/', 'RoleController@index');
19
+	Route::get('/{id}', 'RoleController@find');
20
+	Route::post('/', 'RoleController@insert');
21
+	Route::put('/', 'RoleController@update');
22
+	Route::delete('/{id}', 'RoleController@delete');
23
+	Route::get('list/deleted', 'RoleController@deleted');
24
+	Route::patch('restore/{id}', 'RoleController@restore');
25
+	Route::post('assign/permissions', 'RoleController@assignPermissions');
26 26
 });
Please login to merge, or discard this patch.
src/Modules/Users/Database/Migrations/2015_12_20_124153_users.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -5,37 +5,37 @@
 block discarded – undo
5 5
 
6 6
 class Users extends Migration
7 7
 {
8
-    /**
9
-     * Run the migrations.
10
-     *
11
-     * @return void
12
-     */
13
-    public function up()
14
-    {
15
-        Schema::create('users', function (Blueprint $table) {
16
-            $table->increments('id');
17
-            $table->string('profile_picture', 150)->nullable();
18
-            $table->string('name', 100)->nullable();
19
-            $table->string('email')->unique();
20
-            $table->string('password', 60)->nullable();
21
-            $table->boolean('blocked')->default(0);
22
-            $table->boolean('confirmed')->default(0);
23
-            $table->string('confirmation_code')->nullable();
24
-            $table->string('locale', 2)->default('en');
25
-            $table->string('timezone', 50)->default('Africa/Cairo');
26
-            $table->softDeletes();
27
-            $table->rememberToken();
28
-            $table->timestamps();
29
-        });
30
-    }
8
+	/**
9
+	 * Run the migrations.
10
+	 *
11
+	 * @return void
12
+	 */
13
+	public function up()
14
+	{
15
+		Schema::create('users', function (Blueprint $table) {
16
+			$table->increments('id');
17
+			$table->string('profile_picture', 150)->nullable();
18
+			$table->string('name', 100)->nullable();
19
+			$table->string('email')->unique();
20
+			$table->string('password', 60)->nullable();
21
+			$table->boolean('blocked')->default(0);
22
+			$table->boolean('confirmed')->default(0);
23
+			$table->string('confirmation_code')->nullable();
24
+			$table->string('locale', 2)->default('en');
25
+			$table->string('timezone', 50)->default('Africa/Cairo');
26
+			$table->softDeletes();
27
+			$table->rememberToken();
28
+			$table->timestamps();
29
+		});
30
+	}
31 31
 
32
-    /**
33
-     * Reverse the migrations.
34
-     *
35
-     * @return void
36
-     */
37
-    public function down()
38
-    {
39
-        Schema::dropIfExists('users');
40
-    }
32
+	/**
33
+	 * Reverse the migrations.
34
+	 *
35
+	 * @return void
36
+	 */
37
+	public function down()
38
+	{
39
+		Schema::dropIfExists('users');
40
+	}
41 41
 }
Please login to merge, or discard this patch.
src/Modules/Users/Routes/api.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -15,30 +15,30 @@
 block discarded – undo
15 15
 
16 16
 Route::group(['prefix' => 'users'], function () {
17 17
 
18
-    Route::get('/', 'UserController@index');
19
-    Route::get('/{id}', 'UserController@find');
20
-    Route::post('/', 'UserController@insert');
21
-    Route::put('/', 'UserController@update');
22
-    Route::delete('/{id}', 'UserController@delete');
23
-    Route::get('list/deleted', 'UserController@deleted');
24
-    Route::patch('restore/{id}', 'UserController@restore');
25
-    Route::get('block/{id}', 'UserController@block');
26
-    Route::get('unblock/{id}', 'UserController@unblock');
27
-    Route::post('assign/roles', 'UserController@assignRoles');
18
+	Route::get('/', 'UserController@index');
19
+	Route::get('/{id}', 'UserController@find');
20
+	Route::post('/', 'UserController@insert');
21
+	Route::put('/', 'UserController@update');
22
+	Route::delete('/{id}', 'UserController@delete');
23
+	Route::get('list/deleted', 'UserController@deleted');
24
+	Route::patch('restore/{id}', 'UserController@restore');
25
+	Route::get('block/{id}', 'UserController@block');
26
+	Route::get('unblock/{id}', 'UserController@unblock');
27
+	Route::post('assign/roles', 'UserController@assignRoles');
28 28
 
29
-    Route::group(['prefix' => 'account'], function () {
29
+	Route::group(['prefix' => 'account'], function () {
30 30
 
31
-        Route::get('my', 'UserController@account');
32
-        Route::get('logout', 'UserController@logout');
33
-        Route::post('refresh/token', 'UserController@refreshToken');
34
-        Route::post('save', 'UserController@saveProfile');
35
-        Route::post('register', 'UserController@register');
36
-        Route::post('login', 'UserController@login');
37
-        Route::post('login/social', 'UserController@loginSocial');
38
-        Route::post('send/reset', 'UserController@sendReset');
39
-        Route::post('reset/password', 'UserController@resetPassword');
40
-        Route::post('change/password', 'UserController@changePassword');
41
-        Route::post('confirm/email', 'UserController@confirmEmail');
42
-        Route::post('resend/email/confirmation', 'UserController@resendEmailConfirmation');
43
-    });
31
+		Route::get('my', 'UserController@account');
32
+		Route::get('logout', 'UserController@logout');
33
+		Route::post('refresh/token', 'UserController@refreshToken');
34
+		Route::post('save', 'UserController@saveProfile');
35
+		Route::post('register', 'UserController@register');
36
+		Route::post('login', 'UserController@login');
37
+		Route::post('login/social', 'UserController@loginSocial');
38
+		Route::post('send/reset', 'UserController@sendReset');
39
+		Route::post('reset/password', 'UserController@resetPassword');
40
+		Route::post('change/password', 'UserController@changePassword');
41
+		Route::post('confirm/email', 'UserController@confirmEmail');
42
+		Route::post('resend/email/confirmation', 'UserController@resendEmailConfirmation');
43
+	});
44 44
 });
Please login to merge, or discard this patch.
src/Modules/Users/Database/Seeds/UsersTableSeeder.php 1 patch
Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -8,105 +8,105 @@
 block discarded – undo
8 8
 
9 9
 class UsersTableSeeder extends Seeder
10 10
 {
11
-    /**
12
-     * Run the database seeds.
13
-     *
14
-     * @return void
15
-     */
16
-    public function run()
17
-    {
18
-        /**
19
-         * Create Default roles.
20
-         */
21
-        $role = Role::updateOrInsert([
22
-            'name' => 'Admin',
23
-        ],[
24
-            'created_at' => \DB::raw('NOW()'),
25
-            'updated_at' => \DB::raw('NOW()')
26
-        ]);
11
+	/**
12
+	 * Run the database seeds.
13
+	 *
14
+	 * @return void
15
+	 */
16
+	public function run()
17
+	{
18
+		/**
19
+		 * Create Default roles.
20
+		 */
21
+		$role = Role::updateOrInsert([
22
+			'name' => 'Admin',
23
+		],[
24
+			'created_at' => \DB::raw('NOW()'),
25
+			'updated_at' => \DB::raw('NOW()')
26
+		]);
27 27
 
28
-        /**
29
-         * Create Default user.
30
-         */
31
-        AclUser::updateOrInsert([
32
-            'email' => '[email protected]',
33
-        ],[
34
-            'name'       => 'Admin',
35
-            'password'   => \Hash::make('123456'),
36
-            'confirmed'  => 1,
37
-            'created_at' => \DB::raw('NOW()'),
38
-            'updated_at' => \DB::raw('NOW()')
39
-        ]);
28
+		/**
29
+		 * Create Default user.
30
+		 */
31
+		AclUser::updateOrInsert([
32
+			'email' => '[email protected]',
33
+		],[
34
+			'name'       => 'Admin',
35
+			'password'   => \Hash::make('123456'),
36
+			'confirmed'  => 1,
37
+			'created_at' => \DB::raw('NOW()'),
38
+			'updated_at' => \DB::raw('NOW()')
39
+		]);
40 40
 
41
-        /**
42
-         * Insert the permissions related to users table.
43
-         */
44
-        \DB::table('permissions')->insert(
45
-            [
46
-                /**
47
-                 * Users model permissions.
48
-                 */
49
-                [
50
-                'name'       => 'index',
51
-                'model'      => 'user',
52
-                'created_at' => \DB::raw('NOW()'),
53
-                'updated_at' => \DB::raw('NOW()')
54
-                ],
55
-                [
56
-                'name'       => 'find',
57
-                'model'      => 'user',
58
-                'created_at' => \DB::raw('NOW()'),
59
-                'updated_at' => \DB::raw('NOW()')
60
-                ],
61
-                [
62
-                'name'       => 'insert',
63
-                'model'      => 'user',
64
-                'created_at' => \DB::raw('NOW()'),
65
-                'updated_at' => \DB::raw('NOW()')
66
-                ],
67
-                [
68
-                'name'       => 'update',
69
-                'model'      => 'user',
70
-                'created_at' => \DB::raw('NOW()'),
71
-                'updated_at' => \DB::raw('NOW()')
72
-                ],
73
-                [
74
-                'name'       => 'delete',
75
-                'model'      => 'user',
76
-                'created_at' => \DB::raw('NOW()'),
77
-                'updated_at' => \DB::raw('NOW()')
78
-                ],
79
-                [
80
-                'name'       => 'deleted',
81
-                'model'      => 'user',
82
-                'created_at' => \DB::raw('NOW()'),
83
-                'updated_at' => \DB::raw('NOW()')
84
-                ],
85
-                [
86
-                'name'       => 'restore',
87
-                'model'      => 'user',
88
-                'created_at' => \DB::raw('NOW()'),
89
-                'updated_at' => \DB::raw('NOW()')
90
-                ],
91
-                [
92
-                'name'       => 'assignRoles',
93
-                'model'      => 'user',
94
-                'created_at' => \DB::raw('NOW()'),
95
-                'updated_at' => \DB::raw('NOW()')
96
-                ],
97
-                [
98
-                'name'       => 'block',
99
-                'model'      => 'user',
100
-                'created_at' => \DB::raw('NOW()'),
101
-                'updated_at' => \DB::raw('NOW()')
102
-                ],
103
-                [
104
-                'name'       => 'unblock',
105
-                'model'      => 'user',
106
-                'created_at' => \DB::raw('NOW()'),
107
-                'updated_at' => \DB::raw('NOW()')
108
-                ]
109
-            ]
110
-        );
111
-    }
41
+		/**
42
+		 * Insert the permissions related to users table.
43
+		 */
44
+		\DB::table('permissions')->insert(
45
+			[
46
+				/**
47
+				 * Users model permissions.
48
+				 */
49
+				[
50
+				'name'       => 'index',
51
+				'model'      => 'user',
52
+				'created_at' => \DB::raw('NOW()'),
53
+				'updated_at' => \DB::raw('NOW()')
54
+				],
55
+				[
56
+				'name'       => 'find',
57
+				'model'      => 'user',
58
+				'created_at' => \DB::raw('NOW()'),
59
+				'updated_at' => \DB::raw('NOW()')
60
+				],
61
+				[
62
+				'name'       => 'insert',
63
+				'model'      => 'user',
64
+				'created_at' => \DB::raw('NOW()'),
65
+				'updated_at' => \DB::raw('NOW()')
66
+				],
67
+				[
68
+				'name'       => 'update',
69
+				'model'      => 'user',
70
+				'created_at' => \DB::raw('NOW()'),
71
+				'updated_at' => \DB::raw('NOW()')
72
+				],
73
+				[
74
+				'name'       => 'delete',
75
+				'model'      => 'user',
76
+				'created_at' => \DB::raw('NOW()'),
77
+				'updated_at' => \DB::raw('NOW()')
78
+				],
79
+				[
80
+				'name'       => 'deleted',
81
+				'model'      => 'user',
82
+				'created_at' => \DB::raw('NOW()'),
83
+				'updated_at' => \DB::raw('NOW()')
84
+				],
85
+				[
86
+				'name'       => 'restore',
87
+				'model'      => 'user',
88
+				'created_at' => \DB::raw('NOW()'),
89
+				'updated_at' => \DB::raw('NOW()')
90
+				],
91
+				[
92
+				'name'       => 'assignRoles',
93
+				'model'      => 'user',
94
+				'created_at' => \DB::raw('NOW()'),
95
+				'updated_at' => \DB::raw('NOW()')
96
+				],
97
+				[
98
+				'name'       => 'block',
99
+				'model'      => 'user',
100
+				'created_at' => \DB::raw('NOW()'),
101
+				'updated_at' => \DB::raw('NOW()')
102
+				],
103
+				[
104
+				'name'       => 'unblock',
105
+				'model'      => 'user',
106
+				'created_at' => \DB::raw('NOW()'),
107
+				'updated_at' => \DB::raw('NOW()')
108
+				]
109
+			]
110
+		);
111
+	}
112 112
 }
Please login to merge, or discard this patch.