Skip to content

Commit

Permalink
initial commit of nomadic
Browse files Browse the repository at this point in the history
  • Loading branch information
howtomakeaturn committed Jul 27, 2017
1 parent 12166bf commit c26bc8c
Show file tree
Hide file tree
Showing 762 changed files with 54,548 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

FACEBOOK_CLIENT_ID=null
FACEBOOK_CLIENT_SECRET=null
FACEBOOK_REDIRECT=http://localhost/callback
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/node_modules
/public/storage
/vendor
/.idea
Homestead.json
Homestead.yaml
.env
22 changes: 22 additions & 0 deletions app/ApproveEditing.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace App;

class ApproveEditing
{

function handle()
{
$editing = \App\Editing::whereStatus(\App\Editing::CREATED_STATUS)
->orderBy('created_at', 'asc')->first();

if ($editing && $editing->user->profile->score >= 10) $editing->approve();

if ($editing && $editing->user->profile->score < 10) {
$editing->status = Editing::PENDING_STATUS;

$editing->save();
}
}

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

namespace App;

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

class BusinessHour extends Model
{

public $timestamps = false;

public function getOpenTimeAttribute($value) {
return $value === null ? null : Carbon::parse($value);
}

public function getCloseTimeAttribute($value) {
return $value === null ? null : Carbon::parse($value);
}

}
Loading

0 comments on commit c26bc8c

Please sign in to comment.