Skip to content

Commit ae51e33

Browse files
committed
Impersonation
1 parent 3369f53 commit ae51e33

File tree

15 files changed

+300
-45
lines changed

15 files changed

+300
-45
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ A Laravel CMS Starter project with AdminLTE theme and core features.
88
99
- Password: github
1010

11+
### New
12+
- [Impersonation](http://bpocallaghan.co.za/admin) When logged in, [go here](http://bpocallaghan.co.za/admin/settings/admin/users) and click on the 'impersonate user' action.
13+
1114
## Features / What it includes
1215
- Admin LTE admin theme
1316
- Authorization

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
"type": "project",
77
"require": {
88
"php": ">=5.6.4",
9-
"laravel/framework": "5.4.*",
10-
"laravel/tinker": "~1.0",
11-
"google/recaptcha": "^1.1",
12-
"intervention/image": "^2.3",
139
"bpocallaghan/alert": "^1.0",
10+
"bpocallaghan/impersonate": "^0.1.0",
1411
"bpocallaghan/notify": "^2.0",
1512
"bpocallaghan/titan": "^0.2.3",
13+
"google/recaptcha": "^1.1",
14+
"intervention/image": "^2.3",
15+
"laravel/framework": "5.4.*",
16+
"laravel/tinker": "~1.0",
1617
"spatie/laravel-analytics": "1.4.1",
1718
"yajra/laravel-datatables-oracle": "^7.7"
1819
},

composer.lock

Lines changed: 48 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/app.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
Intervention\Image\ImageServiceProvider::class,
195195
Bpocallaghan\Notify\NotifyServiceProvider::class,
196196
Yajra\Datatables\DatatablesServiceProvider::class,
197+
Bpocallaghan\Impersonate\ImpersonateServiceProvider::class,
197198
Spatie\LaravelAnalytics\LaravelAnalyticsServiceProvider::class,
198199
],
199200

database/seeds/DatabaseSeeder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ class DatabaseSeeder extends Seeder
1111
*/
1212
public function run()
1313
{
14-
$this->call(RoleTableSeeder::class);
15-
$this->call(UserTableSeeder::class);
14+
$this->call(RoleTableSeeder::class);
15+
$this->call(UserTableSeeder::class);
1616

17-
$this->call(NavigationAdminTableSeeder::class);
18-
$this->call(NavigationWebsiteTableSeeder::class);
17+
$this->call(NavigationAdminTableSeeder::class);
18+
$this->call(NavigationWebsiteTableSeeder::class);
1919
}
2020
}

database/seeds/UserTableSeeder.php

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class UserTableSeeder extends Seeder
88
{
9-
public function run()
9+
public function run(Faker\Generator $faker)
1010
{
1111
User::truncate();
1212

@@ -18,7 +18,7 @@ public function run()
1818
'lastname' => 'O\'Callaghan',
1919
'cellphone' => '123456789',
2020
'email' => '[email protected]',
21-
'gender' => 'male',
21+
'gender' => 'ninja',
2222
'password' => bcrypt('admin'),
2323
'security_level' => 10,
2424
'confirmed_at' => Carbon::now()
@@ -47,5 +47,23 @@ public function run()
4747
\App\Models\Role::$ADMIN,
4848
\App\Models\Role::$DEVELOPER,
4949
]);
50+
51+
for ($i = 0; $i < 30; $i++) {
52+
$user = User::create([
53+
'firstname' => $faker->firstName,
54+
'lastname' => $faker->lastName,
55+
'cellphone' => $faker->phoneNumber,
56+
'email' => $faker->email,
57+
'gender' => $faker->randomElement(['male', 'female']),
58+
'password' => bcrypt('secret'),
59+
'security_level' => 10,
60+
'confirmed_at' => Carbon::now()
61+
]);
62+
63+
$user->syncRoles([
64+
\App\Models\Role::$ADMIN,
65+
\App\Models\Role::$DEVELOPER,
66+
]);
67+
}
5068
}
5169
}

public/css/admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/images/admin/ninja.png

13.5 KB
Loading

public/js/admin.js

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
13.5 KB
Loading

0 commit comments

Comments
 (0)