Skip to content

Commit

Permalink
Laravel integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Pollastri committed Jun 10, 2019
1 parent dc3f67f commit 5c8d2a6
Show file tree
Hide file tree
Showing 1,843 changed files with 156,997 additions and 891 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
51 changes: 51 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
APP_NAME="Cipi | Control Panel"
APP_ENV=local
APP_KEY=base64:WQ+Sj40l2yUCfKf6dehlCjJX2AvREK5z4rROsJ2/1LA=
APP_DEBUG=true
APP_URL=https://cipi.and

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=cipi
DB_USERNAME=root
DB_PASSWORD=root

USER_NAME="Cipi Admin"
USER_EMAIL=[email protected]
USER_PASSWORD=12345678

SSH_DEFAULT_PORT=1759

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=[email protected]
MAIL_PASSWORD=39c87c294481ddfbe4defec08cfadbb5-4a62b8e8-5ad03600
MAIL_ENCRYPTION=null
MAIL_FROM_NAME=[email protected]

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
7 changes: 7 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
RewriteEngine On
RewriteBase /

RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]

RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
13 changes: 13 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
php:
preset: laravel
disabled:
- unused_use
finder:
not-name:
- index.php
- server.php
js:
finder:
not-name:
- webpack.mix.js
css: true
21 changes: 0 additions & 21 deletions LICENCE

This file was deleted.

90 changes: 0 additions & 90 deletions alias-add.sh

This file was deleted.

43 changes: 0 additions & 43 deletions alias-del.sh

This file was deleted.

31 changes: 31 additions & 0 deletions app/Alias.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Alias extends Model
{

protected $fillable = [
'domain', 'server_id', 'application_id', 'aliascode',
];


public function application()
{

return $this->belongsTo(Application::class, 'application_id');

}


public function server()
{

return $this->belongsTo(Server::class, 'server_id');

}


}
34 changes: 34 additions & 0 deletions app/Application.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Application extends Model
{

protected $fillable = [
'domain', 'server_id', 'username', 'password', 'dbpass', 'basepath', 'appcode',
];


public function server()
{

return $this->belongsTo(Server::class, 'server_id');

}



public function aliases()
{

return $this->hasMany(Alias::class);

}




}
42 changes: 42 additions & 0 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}

/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');

require base_path('routes/console.php');
}
}
Loading

0 comments on commit 5c8d2a6

Please sign in to comment.