Skip to content
Permalink
Browse files

Initial commit - Larancer project

  • Loading branch information...
Povilas Korop
Povilas Korop committed Nov 15, 2016
0 parents commit 09c629b225d81a66925fe7e3ec842bf38622b14f
Showing with 47,025 additions and 0 deletions.
  1. +32 −0 .env.example
  2. +3 −0 .gitattributes
  3. +7 −0 .gitignore
  4. +49 −0 app/Client.php
  5. +29 −0 app/ClientStatus.php
  6. +40 −0 app/Console/Kernel.php
  7. +31 −0 app/Currency.php
  8. +44 −0 app/Document.php
  9. +65 −0 app/Exceptions/Handler.php
  10. +32 −0 app/Http/Controllers/Auth/ForgotPasswordController.php
  11. +39 −0 app/Http/Controllers/Auth/LoginController.php
  12. +71 −0 app/Http/Controllers/Auth/RegisterController.php
  13. +32 −0 app/Http/Controllers/Auth/ResetPasswordController.php
  14. +106 −0 app/Http/Controllers/ClientStatusesController.php
  15. +131 −0 app/Http/Controllers/ClientsController.php
  16. +13 −0 app/Http/Controllers/Controller.php
  17. +111 −0 app/Http/Controllers/CurrenciesController.php
  18. +121 −0 app/Http/Controllers/DocumentsController.php
  19. +29 −0 app/Http/Controllers/HomeController.php
  20. +106 −0 app/Http/Controllers/IncomeSourcesController.php
  21. +117 −0 app/Http/Controllers/NotesController.php
  22. +106 −0 app/Http/Controllers/ProjectStatusesController.php
  23. +133 −0 app/Http/Controllers/ProjectsController.php
  24. +77 −0 app/Http/Controllers/ReportsController.php
  25. +126 −0 app/Http/Controllers/RolesController.php
  26. +59 −0 app/Http/Controllers/Traits/FileUploadTrait.php
  27. +106 −0 app/Http/Controllers/TransactionTypesController.php
  28. +145 −0 app/Http/Controllers/TransactionsController.php
  29. +21 −0 app/Http/Controllers/UserActionsController.php
  30. +138 −0 app/Http/Controllers/UsersController.php
  31. +56 −0 app/Http/Kernel.php
  32. +17 −0 app/Http/Middleware/EncryptCookies.php
  33. +26 −0 app/Http/Middleware/RedirectIfAuthenticated.php
  34. +17 −0 app/Http/Middleware/VerifyCsrfToken.php
  35. +29 −0 app/Http/Requests/StoreClientStatusesRequest.php
  36. +30 −0 app/Http/Requests/StoreClientsRequest.php
  37. +30 −0 app/Http/Requests/StoreCurrenciesRequest.php
  38. +29 −0 app/Http/Requests/StoreDocumentsRequest.php
  39. +29 −0 app/Http/Requests/StoreIncomeSourcesRequest.php
  40. +29 −0 app/Http/Requests/StoreNotesRequest.php
  41. +29 −0 app/Http/Requests/StoreProjectStatusesRequest.php
  42. +30 −0 app/Http/Requests/StoreProjectsRequest.php
  43. +29 −0 app/Http/Requests/StoreRolesRequest.php
  44. +29 −0 app/Http/Requests/StoreTransactionTypesRequest.php
  45. +32 −0 app/Http/Requests/StoreTransactionsRequest.php
  46. +31 −0 app/Http/Requests/StoreUsersRequest.php
  47. +29 −0 app/Http/Requests/UpdateClientStatusesRequest.php
  48. +30 −0 app/Http/Requests/UpdateClientsRequest.php
  49. +30 −0 app/Http/Requests/UpdateCurrenciesRequest.php
  50. +28 −0 app/Http/Requests/UpdateDocumentsRequest.php
  51. +29 −0 app/Http/Requests/UpdateIncomeSourcesRequest.php
  52. +29 −0 app/Http/Requests/UpdateNotesRequest.php
  53. +29 −0 app/Http/Requests/UpdateProjectStatusesRequest.php
  54. +30 −0 app/Http/Requests/UpdateProjectsRequest.php
  55. +29 −0 app/Http/Requests/UpdateRolesRequest.php
  56. +29 −0 app/Http/Requests/UpdateTransactionTypesRequest.php
  57. +32 −0 app/Http/Requests/UpdateTransactionsRequest.php
  58. +31 −0 app/Http/Requests/UpdateUsersRequest.php
  59. +30 −0 app/IncomeSource.php
  60. +42 −0 app/Note.php
  61. +41 −0 app/Observers/UserActionsObserver.php
  62. +90 −0 app/Project.php
  63. +29 −0 app/ProjectStatus.php
  64. +28 −0 app/Providers/AppServiceProvider.php
  65. +30 −0 app/Providers/AuthServiceProvider.php
  66. +26 −0 app/Providers/BroadcastServiceProvider.php
  67. +32 −0 app/Providers/EventServiceProvider.php
  68. +79 −0 app/Providers/RouteServiceProvider.php
  69. +29 −0 app/Role.php
  70. +122 −0 app/Transaction.php
  71. +29 −0 app/TransactionType.php
  72. +56 −0 app/User.php
  73. +37 −0 app/UserAction.php
  74. +51 −0 artisan
  75. +55 −0 bootstrap/app.php
  76. +34 −0 bootstrap/autoload.php
  77. +2 −0 bootstrap/cache/.gitignore
  78. +53 −0 composer.json
  79. +4,076 −0 composer.lock
  80. +250 −0 config/app.php
  81. +106 −0 config/auth.php
  82. +58 −0 config/broadcasting.php
  83. +91 −0 config/cache.php
  84. +35 −0 config/compile.php
  85. +121 −0 config/database.php
  86. +67 −0 config/filesystems.php
  87. +115 −0 config/mail.php
  88. +85 −0 config/queue.php
  89. +38 −0 config/services.php
  90. +179 −0 config/session.php
  91. +33 −0 config/view.php
  92. +1 −0 database/.gitignore
  93. +24 −0 database/factories/ModelFactory.php
  94. +1 −0 database/migrations/.gitkeep
  95. +32 −0 database/migrations/2014_10_12_100000_create_password_resets_table.php
  96. +35 −0 database/migrations/2016_11_01_093059_create_roles_table.php
  97. +40 −0 database/migrations/2016_11_01_093059_create_users_table.php
  98. +39 −0 database/migrations/2016_11_01_093100_create_user_actions_table.php
  99. +37 −0 database/migrations/2016_11_01_093938_create_currencies_table.php
  100. +35 −0 database/migrations/2016_11_01_094240_create_transaction_types_table.php
  101. +36 −0 database/migrations/2016_11_01_094436_create_income_sources_table.php
  102. +35 −0 database/migrations/2016_11_01_094559_create_client_statuses_table.php
  103. +35 −0 database/migrations/2016_11_01_094644_create_project_statuses_table.php
  104. +44 −0 database/migrations/2016_11_02_011723_create_clients_table.php
  105. +42 −0 database/migrations/2016_11_02_013141_create_projects_table.php
  106. +37 −0 database/migrations/2016_11_02_020222_create_notes_table.php
  107. +39 −0 database/migrations/2016_11_02_020435_create_documents_table.php
  108. +46 −0 database/migrations/2016_11_02_021725_create_transactions_table.php
  109. +1 −0 database/seeds/.gitkeep
  110. +24 −0 database/seeds/ClientSeed.php
  111. +25 −0 database/seeds/ClientStatusSeed.php
  112. +26 −0 database/seeds/CurrencySeed.php
  113. +29 −0 database/seeds/DatabaseSeeder.php
  114. +25 −0 database/seeds/IncomeSourceSeed.php
  115. +24 −0 database/seeds/NoteSeed.php
  116. +24 −0 database/seeds/ProjectSeed.php
  117. +26 −0 database/seeds/ProjectStatusSeed.php
  118. +25 −0 database/seeds/RoleSeed.php
  119. +24 −0 database/seeds/TransactionSeed.php
  120. +25 −0 database/seeds/TransactionTypeSeed.php
  121. +24 −0 database/seeds/UserSeed.php
  122. +19 −0 gulpfile.js
  123. +18 −0 package.json
  124. +27 −0 phpunit.xml
  125. +20 −0 public/.htaccess
  126. 0 public/favicon.ico
  127. +58 −0 public/index.php
  128. +5 −0 public/quickadmin/css/bootstrap.min.css
  129. BIN public/quickadmin/css/close.png
  130. +13,731 −0 public/quickadmin/css/components.css
  131. +4 −0 public/quickadmin/css/font-awesome.min.css
  132. +3,104 −0 public/quickadmin/css/quickadmin-layout.css
  133. +912 −0 public/quickadmin/css/quickadmin-theme-default.css
  134. +29 −0 public/quickadmin/css/textext.core.css
  135. +49 −0 public/quickadmin/css/textext.plugin.tags.css
  136. BIN public/quickadmin/fonts/FontAwesome.otf
  137. BIN public/quickadmin/fonts/fontawesome-webfont.eot
  138. +565 −0 public/quickadmin/fonts/fontawesome-webfont.svg
  139. BIN public/quickadmin/fonts/fontawesome-webfont.ttf
  140. BIN public/quickadmin/fonts/fontawesome-webfont.woff
  141. BIN public/quickadmin/fonts/fontawesome-webfont.woff2
  142. BIN public/quickadmin/images/sidebar_toggler_icon_default.png
  143. +7 −0 public/quickadmin/js/bootstrap.min.js
  144. +145 −0 public/quickadmin/js/main.js
  145. +1,617 −0 public/quickadmin/js/textext.core.js
  146. +698 −0 public/quickadmin/js/textext.plugin.tags.js
  147. +2,263 −0 public/quickadmin/js/timepicker.js
  148. +10,029 −0 public/quickadmin/js/vue.js
  149. +8 −0 public/quickadmin/js/vue.min.js
  150. +2 −0 public/robots.txt
  151. BIN public/uploads/1478095546-2015-Macbook-Pro-Retina.jpg
  152. +2 −0 public/uploads/1478516175-blog
  153. +17 −0 readme.md
  154. +20 −0 resources/assets/js/app.js
  155. +45 −0 resources/assets/js/bootstrap.js
  156. +23 −0 resources/assets/js/components/Example.vue
  157. +9 −0 resources/assets/sass/app.scss
  158. +37 −0 resources/assets/sass/variables.scss
  159. +19 −0 resources/lang/en/auth.php
  160. +19 −0 resources/lang/en/pagination.php
  161. +22 −0 resources/lang/en/passwords.php
  162. +115 −0 resources/lang/en/validation.php
  163. +1 −0 resources/views/auth/emails/password.blade.php
  164. +73 −0 resources/views/auth/login.blade.php
  165. +54 −0 resources/views/auth/passwords/email.blade.php
  166. +75 −0 resources/views/auth/passwords/reset.blade.php
  167. +32 −0 resources/views/client_statuses/create.blade.php
  168. +33 −0 resources/views/client_statuses/edit.blade.php
  169. +55 −0 resources/views/client_statuses/index.blade.php
  170. +26 −0 resources/views/client_statuses/show.blade.php
  171. +128 −0 resources/views/clients/create.blade.php
  172. +129 −0 resources/views/clients/edit.blade.php
  173. +71 −0 resources/views/clients/index.blade.php
  174. +34 −0 resources/views/clients/show.blade.php
  175. +57 −0 resources/views/currencies/create.blade.php
  176. +58 −0 resources/views/currencies/edit.blade.php
  177. +59 −0 resources/views/currencies/index.blade.php
  178. +28 −0 resources/views/currencies/show.blade.php
  179. +69 −0 resources/views/documents/create.blade.php
  180. +57 −0 resources/views/documents/edit.blade.php
  181. +59 −0 resources/views/documents/index.blade.php
  182. +29 −0 resources/views/documents/show.blade.php
  183. +47 −0 resources/views/errors/503.blade.php
  184. +15 −0 resources/views/home.blade.php
  185. +44 −0 resources/views/income_sources/create.blade.php
  186. +45 −0 resources/views/income_sources/edit.blade.php
  187. +57 −0 resources/views/income_sources/index.blade.php
  188. +27 −0 resources/views/income_sources/show.blade.php
  189. +66 −0 resources/views/layouts/app.blade.php
  190. +24 −0 resources/views/layouts/auth.blade.php
  191. +44 −0 resources/views/notes/create.blade.php
  192. +45 −0 resources/views/notes/edit.blade.php
  193. +57 −0 resources/views/notes/index.blade.php
  194. +27 −0 resources/views/notes/show.blade.php
  195. +35 −0 resources/views/partials/head.blade.php
  196. +21 −0 resources/views/partials/header.blade.php
  197. +12 −0 resources/views/partials/javascripts.blade.php
  198. +135 −0 resources/views/partials/sidebar.blade.php
  199. +24 −0 resources/views/partials/topbar.blade.php
  200. +32 −0 resources/views/project_statuses/create.blade.php
  201. +33 −0 resources/views/project_statuses/edit.blade.php
  202. +55 −0 resources/views/project_statuses/index.blade.php
  203. +26 −0 resources/views/project_statuses/show.blade.php
  204. +102 −0 resources/views/projects/create.blade.php
  205. +103 −0 resources/views/projects/edit.blade.php
  206. +68 −0 resources/views/projects/index.blade.php
  207. +31 −0 resources/views/projects/show.blade.php
  208. +46 −0 resources/views/reports/index.blade.php
  209. +32 −0 resources/views/roles/create.blade.php
  210. +33 −0 resources/views/roles/edit.blade.php
  211. +55 −0 resources/views/roles/index.blade.php
  212. +26 −0 resources/views/roles/show.blade.php
  213. +32 −0 resources/views/transaction_types/create.blade.php
  214. +33 −0 resources/views/transaction_types/edit.blade.php
  215. +55 −0 resources/views/transaction_types/index.blade.php
  216. +26 −0 resources/views/transaction_types/show.blade.php
  217. +126 −0 resources/views/transactions/create.blade.php
  218. +127 −0 resources/views/transactions/edit.blade.php
  219. +67 −0 resources/views/transactions/index.blade.php
  220. +33 −0 resources/views/transactions/show.blade.php
  221. +50 −0 resources/views/user_actions/index.blade.php
  222. +68 −0 resources/views/users/create.blade.php
  223. +69 −0 resources/views/users/edit.blade.php
  224. +59 −0 resources/views/users/index.blade.php
  225. +30 −0 resources/views/users/show.blade.php
  226. +1 −0 resources/views/vendor/.gitkeep
  227. +5 −0 routes/api.php
  228. +18 −0 routes/console.php
  229. +53 −0 routes/web.php
  230. +21 −0 server.php
  231. +3 −0 storage/app/.gitignore
  232. +2 −0 storage/app/public/.gitignore
  233. +8 −0 storage/framework/.gitignore
  234. +2 −0 storage/framework/cache/.gitignore
  235. +2 −0 storage/framework/sessions/.gitignore
  236. +2 −0 storage/framework/views/.gitignore
  237. +2 −0 storage/logs/.gitignore
  238. +19 −0 tests/ExampleTest.php
  239. +25 −0 tests/TestCase.php
@@ -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

PUSHER_KEY=
PUSHER_SECRET=
PUSHER_APP_ID=
@@ -0,0 +1,3 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
@@ -0,0 +1,7 @@
/node_modules
/public/storage
/vendor
/.idea
Homestead.json
Homestead.yaml
.env
@@ -0,0 +1,49 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
/**
* Class Client
*
* @package App
* @property string $first_name
* @property string $last_name
* @property string $company_name
* @property string $email
* @property string $phone
* @property string $website
* @property string $skype
* @property string $country
* @property string $client_status
*/
class Client extends Model
{
use SoftDeletes;
protected $fillable = ['first_name', 'last_name', 'company_name', 'email', 'phone', 'website', 'skype', 'country', 'client_status_id'];
public static function boot()
{
parent::boot();
Client::observe(new \App\Observers\UserActionsObserver);
}
/**
* Set to null if empty
* @param $input
*/
public function setClientStatusIdAttribute($input)
{
$this->attributes['client_status_id'] = $input ? $input : null;
}
public function client_status()
{
return $this->belongsTo(ClientStatus::class, 'client_status_id')->withTrashed();
}
}
@@ -0,0 +1,29 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
/**
* Class ClientStatus
*
* @package App
* @property string $title
*/
class ClientStatus extends Model
{
use SoftDeletes;
protected $fillable = ['title'];
public static function boot()
{
parent::boot();
ClientStatus::observe(new \App\Observers\UserActionsObserver);
}
}
@@ -0,0 +1,40 @@
<?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 Closure based commands for the application.
*
* @return void
*/
protected function commands()
{
require base_path('routes/console.php');
}
}
@@ -0,0 +1,31 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
/**
* Class Currency
*
* @package App
* @property string $title
* @property string $code
* @property tinyInteger $main_currency
*/
class Currency extends Model
{
use SoftDeletes;
protected $fillable = ['title', 'code', 'main_currency'];
public static function boot()
{
parent::boot();
Currency::observe(new \App\Observers\UserActionsObserver);
}
}
@@ -0,0 +1,44 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
/**
* Class Document
*
* @package App
* @property string $project
* @property string $title
* @property text $description
* @property string $file
*/
class Document extends Model
{
use SoftDeletes;
protected $fillable = ['title', 'description', 'file', 'project_id'];
public static function boot()
{
parent::boot();
Document::observe(new \App\Observers\UserActionsObserver);
}
/**
* Set to null if empty
* @param $input
*/
public function setProjectIdAttribute($input)
{
$this->attributes['project_id'] = $input ? $input : null;
}
public function project()
{
return $this->belongsTo(Project::class, 'project_id')->withTrashed();
}
}
@@ -0,0 +1,65 @@
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
\Illuminate\Auth\AuthenticationException::class,
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @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);
}
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest('login');
}
}
@@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/
use SendsPasswordResetEmails;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
@@ -0,0 +1,39 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
}
}

0 comments on commit 09c629b

Please sign in to comment.
You can’t perform that action at this time.