Skip to content

Commit

Permalink
Merge branch 'master' into 1.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaAb committed May 26, 2019
2 parents bacd2b3 + 9dcce0b commit ccd0a72
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 13 deletions.
52 changes: 48 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@

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

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



## Main features

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


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



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


## Installation
First you need to create a laravel 5.8 project.

Add LaravelPanel with runing this code in CMD

composer require serverfireteam/panel

Or Add the package to require section of composer And run the composer update command, the package and its dependencies will be installed.

{
"require": {
"serverfireteam/panel": "1.9.*"
},
}



Add the ServiceProvider of the package to the list of providers in the config/app.php file

'providers' => array(
Serverfireteam\Panel\PanelServiceProvider::class
)

Run the following command in order to publish configs, views and assets.

php artisan panel:install

Go to your domain.com/panel and you can login with the following username and password :

username: [email protected]
password: 12345


[for more details read the wiki here](https://github.com/serverfireteam/panel/wiki)



Good news! We're currently available for remote and on-site consulting for small, large and enterprise teams. Please contact [email protected] with your needs and let's work together!

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
],
"require": {
"php": ">=7.0",
"php": ">=7.1.3",
"illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*",
"serverfireteam/rapyd-laravel" : "1.5.*",
"maatwebsite/excel": "~3.1.13",
Expand Down
59 changes: 54 additions & 5 deletions src/Serverfireteam/Panel/Commands/PanelCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,33 @@ public function __construct()
*/
public function handle()
{
$this->info(' [ Welcome to ServerFireTeam Panel Installation ] ');
$this->info(' [ Welcome to ServerFireTeam Panel Installation ] ');

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

$this->call('vendor:publish');
$this->info('** publishing panel assets');
$this->call('vendor:publish', [
'--tag' => 'public',
'--quiet' => null
//'--force' => 1
]);
$this->info('** publishing panel config');
$this->call('vendor:publish', [
'--tag' => 'config',
'--quiet' => null
//'--force' => 1
]);
$this->info('** publishing panel views');
$this->call('vendor:publish', [
'--tag' => 'views',
'--quiet' => null
//'--force' => 1
]);

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

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

/**
Expand All @@ -66,4 +84,35 @@ protected function getOptions()
return [];
}

/**
* Copy specific directories to destination
* @param $destination
* @return bool
* @throws \ReflectionException
*/
protected function copyFiles($destination)
{
$result = true;
$directories = array('public');
$root_path = $this->getRootPath();
foreach($directories as $dir){
$path = $root_path.'/'.$dir;
$success = $this->files->copyDirectory($path, $destination);
$result = $success && $result;
}
return $result;
}

/**
* Find the root path from the vendor dir.
* @return bool|string
* @throws \ReflectionException
*/
protected function getRootPath()
{
$reflector = new \ReflectionClass('serverfireteam_panel');
$path = realpath(dirname($reflector->getFileName()) . '/..');
return $path;
}

}
7 changes: 4 additions & 3 deletions src/Serverfireteam/Panel/PanelServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,20 @@ public function register()

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

$this->publishes([
__DIR__.'/config/panel.php' => config_path('panel.php'),
]);
__DIR__.'/config/elfinder.php' => config_path('elfinder.php'),
], 'config');
}

public function boot()
{
$this->loadViewsFrom(__DIR__.'/../../views', 'panelViews');
$this->publishes([
__DIR__.'/../../views' => base_path('resources/views/vendor/panelViews'),
]);
], 'views');

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

Expand Down
9 changes: 9 additions & 0 deletions src/serverfireteam_panel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
namespace Serverfireteam\Panel;

class serverfireteam_panel
{
public static function getname() {
return "Serverfireteam Panel";
}
}

0 comments on commit ccd0a72

Please sign in to comment.