Skip to content

Commit ccd0a72

Browse files
committed
Merge branch 'master' into 1.9.0
2 parents bacd2b3 + 9dcce0b commit ccd0a72

File tree

5 files changed

+116
-13
lines changed

5 files changed

+116
-13
lines changed

README.md

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88

99
This package provides an easily configurable admin panel for Laravel applications with a CRUD system, UI and more.
1010

11-
## Screen shot
12-
- This is a custom CRUD with few lines of code :
13-
![dashboard of panel](https://raw.githubusercontent.com/serverfireteam/panel/master/public/img/serverfire-panel-dashboard.jpg)
14-
![Edit Pages](https://raw.githubusercontent.com/serverfireteam/panel/master/public/img/serverfire-panel-crud-edit.jpg)
11+
## Table of Contents
12+
* [Main features](#main-features)
13+
* [Screen shots](#screen-shot)
14+
* [Document](#document)
15+
* [Installation](#Installation)
16+
17+
1518

1619
## Main features
1720

@@ -30,12 +33,53 @@ This package provides an easily configurable admin panel for Laravel application
3033
- ** RTL support **
3134

3235

36+
## Screen shot
37+
- This is a custom CRUD with few lines of code :
38+
![dashboard of panel](https://raw.githubusercontent.com/serverfireteam/panel/master/public/img/serverfire-panel-dashboard.jpg)
39+
![Edit Pages](https://raw.githubusercontent.com/serverfireteam/panel/master/public/img/serverfire-panel-crud-edit.jpg)
40+
3341

3442

3543
## Document
3644
[Read the wiki here](https://github.com/serverfireteam/panel/wiki)
3745

3846

47+
## Installation
48+
First you need to create a laravel 5.8 project.
49+
50+
Add LaravelPanel with runing this code in CMD
51+
52+
composer require serverfireteam/panel
53+
54+
Or Add the package to require section of composer And run the composer update command, the package and its dependencies will be installed.
55+
56+
{
57+
"require": {
58+
"serverfireteam/panel": "1.9.*"
59+
},
60+
}
61+
62+
63+
64+
Add the ServiceProvider of the package to the list of providers in the config/app.php file
65+
66+
'providers' => array(
67+
Serverfireteam\Panel\PanelServiceProvider::class
68+
)
69+
70+
Run the following command in order to publish configs, views and assets.
71+
72+
php artisan panel:install
73+
74+
Go to your domain.com/panel and you can login with the following username and password :
75+
76+
username: admin@change.me
77+
password: 12345
78+
79+
80+
[for more details read the wiki here](https://github.com/serverfireteam/panel/wiki)
81+
82+
3983

4084
Good news! We're currently available for remote and on-site consulting for small, large and enterprise teams. Please contact info@serverfire.net with your needs and let's work together!
4185

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
],
2424
"require": {
25-
"php": ">=7.0",
25+
"php": ">=7.1.3",
2626
"illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*",
2727
"serverfireteam/rapyd-laravel" : "1.5.*",
2828
"maatwebsite/excel": "~3.1.13",

src/Serverfireteam/Panel/Commands/PanelCommand.php

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,33 @@ public function __construct()
3535
*/
3636
public function handle()
3737
{
38-
$this->info(' [ Welcome to ServerFireTeam Panel Installation ] ');
38+
$this->info(' [ Welcome to ServerFireTeam Panel Installation ] ');
3939

40-
$this->call('elfinder:publish');
40+
$this->info('** publishing elfinder assets');
41+
$this->call('elfinder:publish');
4142

42-
$this->call('vendor:publish');
43+
$this->info('** publishing panel assets');
44+
$this->call('vendor:publish', [
45+
'--tag' => 'public',
46+
'--quiet' => null
47+
//'--force' => 1
48+
]);
49+
$this->info('** publishing panel config');
50+
$this->call('vendor:publish', [
51+
'--tag' => 'config',
52+
'--quiet' => null
53+
//'--force' => 1
54+
]);
55+
$this->info('** publishing panel views');
56+
$this->call('vendor:publish', [
57+
'--tag' => 'views',
58+
'--quiet' => null
59+
//'--force' => 1
60+
]);
4361

44-
$this->call('migrate', array('--path' => 'vendor/serverfireteam/panel/src/database/migrations'));
62+
$this->call('migrate', array('--path' => 'vendor/serverfireteam/panel/src/database/migrations'));
4563

46-
$this->call('db:seed', array('--class' => '\Serverfireteam\Panel\LinkSeeder'));
64+
$this->call('db:seed', array('--class' => '\Serverfireteam\Panel\LinkSeeder'));
4765
}
4866

4967
/**
@@ -66,4 +84,35 @@ protected function getOptions()
6684
return [];
6785
}
6886

87+
/**
88+
* Copy specific directories to destination
89+
* @param $destination
90+
* @return bool
91+
* @throws \ReflectionException
92+
*/
93+
protected function copyFiles($destination)
94+
{
95+
$result = true;
96+
$directories = array('public');
97+
$root_path = $this->getRootPath();
98+
foreach($directories as $dir){
99+
$path = $root_path.'/'.$dir;
100+
$success = $this->files->copyDirectory($path, $destination);
101+
$result = $success && $result;
102+
}
103+
return $result;
104+
}
105+
106+
/**
107+
* Find the root path from the vendor dir.
108+
* @return bool|string
109+
* @throws \ReflectionException
110+
*/
111+
protected function getRootPath()
112+
{
113+
$reflector = new \ReflectionClass('serverfireteam_panel');
114+
$path = realpath(dirname($reflector->getFileName()) . '/..');
115+
return $path;
116+
}
117+
69118
}

src/Serverfireteam/Panel/PanelServiceProvider.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,20 @@ public function register()
103103

104104
$this->publishes([
105105
__DIR__ . '/../../../public' => public_path('packages/serverfireteam/panel')
106-
]);
106+
], 'public');
107107

108108
$this->publishes([
109109
__DIR__.'/config/panel.php' => config_path('panel.php'),
110-
]);
110+
__DIR__.'/config/elfinder.php' => config_path('elfinder.php'),
111+
], 'config');
111112
}
112113

113114
public function boot()
114115
{
115116
$this->loadViewsFrom(__DIR__.'/../../views', 'panelViews');
116117
$this->publishes([
117118
__DIR__.'/../../views' => base_path('resources/views/vendor/panelViews'),
118-
]);
119+
], 'views');
119120

120121
include __DIR__."/../../routes.php";
121122

src/serverfireteam_panel.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
namespace Serverfireteam\Panel;
3+
4+
class serverfireteam_panel
5+
{
6+
public static function getname() {
7+
return "Serverfireteam Panel";
8+
}
9+
}

0 commit comments

Comments
 (0)