Skip to content

Commit 31bb8fc

Browse files
authored
Merge pull request #358 from viralsolani/develop
Merge Develop branch
2 parents 78874d2 + 451e19d commit 31bb8fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+8393
-3006
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ APP_DEBUG=true
66
APP_LOG_LEVEL=debug
77
APP_URL=http://localhost
88

9+
910
DB_CONNECTION=mysql
1011
DB_HOST=127.0.0.1
1112
DB_PORT=3306

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ composer.lock
3434
public/img/backend/blog_images/*
3535
public/mix-manifest.json
3636
public/access.log
37-
public/error.log
37+
public/error.log
38+
!public/js/jquerysession.min.js

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ Generate a new application key
6161

6262
php artisan key:generate
6363

64-
Generate a new JWT secret key (If you want to use API)
65-
php artisan jwt:secret
66-
6764
Generate a new JWT authentication secret key
6865

6966
php artisan jwt:secret
@@ -113,6 +110,10 @@ You can now access the server at http://localhost:8000
113110
php artisan jwt:secret
114111
php artisan vendor:publish --tag=lfm_public
115112

113+
## Please note
114+
115+
- To run test cases, add SQLite support to your php
116+
116117
## Logging In
117118

118119
`php artisan db:seed` adds three users with respective roles. The credentials are as follows:
@@ -139,7 +140,11 @@ Password: `1234`
139140
If you come across any issues please report them [here](https://github.com/viralsolani/laravel-adminpanel/issues).
140141

141142
## Contributing
142-
Feel free to create any pull requests for the project. For proposing any new changes or features you want to add to the project, you can send us an email at viral.solani@gmail.com or basapativipulkumar@gmail.com.
143+
Feel free to create any pull requests for the project. For proposing any new changes or features you want to add to the project, you can send us an email at following addresses.
144+
145+
(1) Viral Solani - viral.solani@gmail.com
146+
(2) Vipulkumar Basapati - basapativipulkumar@gmail.com
147+
(3) Vallabh Kansagara - vrkansagara@gmail.com
143148

144149
## License
145150

access.log

Lines changed: 147 additions & 0 deletions
Large diffs are not rendered by default.

app/Console/Commands/InstallAppCommand.php

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Console\Commands;
44

5+
use Exception;
56
use Illuminate\Console\Command;
67
use Illuminate\Filesystem\Filesystem;
78
use Illuminate\Support\Facades\Artisan;
@@ -39,6 +40,31 @@ class InstallAppCommand extends Command
3940
*/
4041
protected $files;
4142

43+
/**
44+
* host for the database.
45+
*/
46+
protected $host;
47+
48+
/**
49+
* port for the database.
50+
*/
51+
protected $port;
52+
53+
/**
54+
* Database name.
55+
*/
56+
protected $database;
57+
58+
/**
59+
* Username of database.
60+
*/
61+
protected $username;
62+
63+
/**
64+
* Password for the Database.
65+
*/
66+
protected $password;
67+
4268
/**
4369
* InstallAppCommand constructor.
4470
*
@@ -210,7 +236,9 @@ protected function getKeyFile()
210236
}
211237

212238
/**
213-
* @param $database
239+
* Create the Database.
240+
*
241+
* @param object $database
214242
*/
215243
protected function createDatabase($database)
216244
{
@@ -237,7 +265,9 @@ protected function createDatabase($database)
237265
}
238266

239267
/**
240-
* @param $database
268+
* Dump the DB.
269+
*
270+
* @param object $database
241271
*/
242272
protected function dumpDB($database)
243273
{
@@ -258,7 +288,9 @@ protected function dumpDB($database)
258288
}
259289

260290
/**
261-
* @param $database
291+
* Migrate Tables.
292+
*
293+
* @param object $database
262294
*/
263295
protected function migrateTables($database)
264296
{

app/Http/Breadcrumbs/Backend/Backend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
Breadcrumbs::register('admin.dashboard', function ($breadcrumbs) {
4-
$breadcrumbs->push('Dashboard', route('admin.dashboard'));
4+
$breadcrumbs->push(__('navs.backend.dashboard'), route('admin.dashboard'));
55
});
66

77
require __DIR__.'/Search.php';

app/Providers/AppServiceProvider.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ class AppServiceProvider extends ServiceProvider
1010
{
1111
/**
1212
* Bootstrap any application services.
13-
*
14-
* @return void
1513
*/
1614
public function boot()
1715
{
@@ -53,8 +51,6 @@ public function boot()
5351

5452
/**
5553
* Register any application services.
56-
*
57-
* @return void
5854
*/
5955
public function register()
6056
{
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?php
2+
3+
namespace App\Providers;
4+
5+
use Illuminate\Support\Facades\Gate;
6+
use Laravel\Telescope\IncomingEntry;
7+
use Laravel\Telescope\Telescope;
8+
use Laravel\Telescope\TelescopeApplicationServiceProvider;
9+
10+
class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
11+
{
12+
/**
13+
* Register any application services.
14+
*
15+
* @return void
16+
*/
17+
public function register()
18+
{
19+
// Telescope::night();
20+
21+
$this->hideSensitiveRequestDetails();
22+
23+
Telescope::filter(function (IncomingEntry $entry) {
24+
if ($this->app->isLocal()) {
25+
return true;
26+
}
27+
28+
return $entry->isReportableException() ||
29+
$entry->isFailedJob() ||
30+
$entry->isScheduledTask() ||
31+
$entry->hasMonitoredTag();
32+
});
33+
}
34+
35+
/**
36+
* Prevent sensitive request details from being logged by Telescope.
37+
*
38+
* @return void
39+
*/
40+
protected function hideSensitiveRequestDetails()
41+
{
42+
if ($this->app->isLocal()) {
43+
return;
44+
}
45+
46+
Telescope::hideRequestParameters(['_token']);
47+
48+
Telescope::hideRequestHeaders([
49+
'cookie',
50+
'x-csrf-token',
51+
'x-xsrf-token',
52+
]);
53+
}
54+
55+
/**
56+
* Register the Telescope gate.
57+
*
58+
* This gate determines who can access Telescope in non-local environments.
59+
*
60+
* @return void
61+
*/
62+
protected function gate()
63+
{
64+
Gate::define('viewTelescope', function ($user) {
65+
return in_array($user->email, [
66+
//
67+
]);
68+
});
69+
}
70+
}

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,28 @@
1616
"arcanedev/no-captcha": "^5.0",
1717
"creativeorange/gravatar": "~1.0",
1818
"davejamesmiller/laravel-breadcrumbs": "^5.0",
19-
"doctrine/dbal": "^2.6",
19+
"doctrine/dbal": "^2.9",
2020
"fideloper/proxy": "^4.0",
2121
"hieu-le/active": "^3.5",
2222
"laravel/framework": "5.7.*",
2323
"laravel/socialite": "^3.0",
2424
"laravel/tinker": "~1.0",
2525
"laravelcollective/html": "^5.4.0",
2626
"spatie/laravel-cors": "^1.2",
27-
"tymon/jwt-auth":"1.0.0-rc.3",
27+
"tymon/jwt-auth": "1.0.0-rc.3",
2828
"unisharp/laravel-filemanager": "~1.8",
2929
"yajra/laravel-datatables-oracle": "~8.0"
3030
},
3131
"require-dev": {
32+
"laravel/telescope": "^1.0",
3233
"barryvdh/laravel-debugbar": "^3.0",
33-
"codedungeon/phpunit-result-printer": "^0.19.10",
3434
"bvipul/generator": "^5.6",
35+
"codedungeon/phpunit-result-printer": "^0.19.10",
3536
"filp/whoops": "~2.0",
3637
"fzaninotto/faker": "~1.4",
3738
"laravel/browser-kit-testing": "^4.0.0",
3839
"mockery/mockery": "0.9.*",
40+
"nunomaduro/larastan": "^0.3.8",
3941
"phpunit/phpunit": "~7.0",
4042
"xethron/migrations-generator": "2.0.2"
4143
},

0 commit comments

Comments
 (0)