Skip to content

Commit

Permalink
QuickAdminPanel automatic commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LaravelDaily committed Oct 3, 2019
0 parents commit f0e33c5
Show file tree
Hide file tree
Showing 300 changed files with 27,887 additions and 0 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,yaml}]
indent_size = 2
44 changes: 44 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack

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

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.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

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
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
32 changes: 32 additions & 0 deletions app/AccountType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace App;

use App\Traits\Auditable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class AccountType extends Model
{
use SoftDeletes, Auditable;

public $table = 'account_types';

protected $dates = [
'created_at',
'updated_at',
'deleted_at',
];

protected $fillable = [
'title',
'created_at',
'updated_at',
'deleted_at',
];

public function bankAccounts()
{
return $this->hasMany(BankAccount::class, 'account_type_id', 'id');
}
}
21 changes: 21 additions & 0 deletions app/AuditLog.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class AuditLog extends Model
{
protected $fillable = [
'description',
'subject_id',
'subject_type',
'user_id',
'properties',
'host',
];

protected $casts = [
'properties' => 'collection',
];
}
60 changes: 60 additions & 0 deletions app/BankAccount.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php

namespace App;

use App\Traits\Auditable;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class BankAccount extends Model
{
use SoftDeletes, Auditable;

public $table = 'bank_accounts';

protected $dates = [
'updated_at',
'created_at',
'deleted_at',
'account_opening_date',
];

protected $fillable = [
'balance',
'bank_name',
'created_at',
'updated_at',
'deleted_at',
'branch_name',
'account_title',
'account_number',
'account_type_id',
'account_opening_date',
];

public function projects()
{
return $this->hasMany(Project::class, 'bank_account_id', 'id');
}

public function account_type()
{
return $this->belongsTo(AccountType::class, 'account_type_id');
}

public function users()
{
return $this->belongsToMany(User::class);
}

public function getAccountOpeningDateAttribute($value)
{
return $value ? Carbon::parse($value)->format(config('panel.date_format')) : null;
}

public function setAccountOpeningDateAttribute($value)
{
$this->attributes['account_opening_date'] = $value ? Carbon::createFromFormat(config('panel.date_format'), $value)->format('Y-m-d') : null;
}
}
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');
}
}
51 changes: 51 additions & 0 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

namespace App\Exceptions;

use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;

class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];

/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];

/**
* Report or log an exception.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}

/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
}
46 changes: 46 additions & 0 deletions app/Expense.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

namespace App;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Expense extends Model
{
use SoftDeletes;

public $table = 'expenses';

protected $dates = [
'entry_date',
'created_at',
'updated_at',
'deleted_at',
];

protected $fillable = [
'amount',
'entry_date',
'created_at',
'updated_at',
'deleted_at',
'description',
'expense_category_id',
];

public function expense_category()
{
return $this->belongsTo(ExpenseCategory::class, 'expense_category_id');
}

public function getEntryDateAttribute($value)
{
return $value ? Carbon::parse($value)->format(config('panel.date_format')) : null;
}

public function setEntryDateAttribute($value)
{
$this->attributes['entry_date'] = $value ? Carbon::createFromFormat(config('panel.date_format'), $value)->format('Y-m-d') : null;
}
}
31 changes: 31 additions & 0 deletions app/ExpenseCategory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class ExpenseCategory extends Model
{
use SoftDeletes;

public $table = 'expense_categories';

protected $dates = [
'created_at',
'updated_at',
'deleted_at',
];

protected $fillable = [
'name',
'created_at',
'updated_at',
'deleted_at',
];

public function expenses()
{
return $this->hasMany(Expense::class, 'expense_category_id', 'id');
}
}
Loading

0 comments on commit f0e33c5

Please sign in to comment.