Permalink
Browse files

Upgrade to Laravel 5.5

This is a retrofit of the 5.1-based application on top of a clean
Laravel installation. The application structure is more-or-less the
same, but uses more current Laravel norms. The use of Vue has also
been refined by refactoring to single-file components and putting more
display logic on the client-side where it can be done less verbosely
than it was before. The UI has also been reworked around Bootstrap tab
navigation.
  • Loading branch information...
lovett committed Jan 20, 2018
1 parent ed7b6d9 commit 0c59a5a6f48a41a8e5c4a5fed70b4984a42f52a3
Showing with 87,727 additions and 14,463 deletions.
  1. +19 −3 .env.example
  2. +0 −14 .eslintrc.js
  3. +3 −1 .gitattributes
  4. +15 −6 .gitignore
  5. +0 −75 .php_cs
  6. +7 −0 Makefile
  7. +11 −20 app/Client.php
  8. +0 −36 app/Console/Commands/Inspire.php
  9. +17 −7 app/Console/Kernel.php
  10. +0 −10 app/Events/Event.php
  11. +21 −26 app/Exceptions/Handler.php
  12. +1 −1 app/Helpers/AddressHelper.php
  13. +85 −19 app/Helpers/LinkHelper.php
  14. +36 −0 app/Helpers/MessagingHelper.php
  15. +0 −69 app/Http/Controllers/Auth/AuthController.php
  16. +32 −0 app/Http/Controllers/Auth/ForgotPasswordController.php
  17. +41 −0 app/Http/Controllers/Auth/LoginController.php
  18. +0 −22 app/Http/Controllers/Auth/PasswordController.php
  19. +72 −0 app/Http/Controllers/Auth/RegisterController.php
  20. +39 −0 app/Http/Controllers/Auth/ResetPasswordController.php
  21. +48 −56 app/Http/Controllers/ClientController.php
  22. +4 −49 app/Http/Controllers/Controller.php
  23. +9 −11 app/Http/Controllers/DashboardController.php
  24. +30 −40 app/Http/Controllers/InvoiceController.php
  25. +49 −51 app/Http/Controllers/ProjectController.php
  26. +26 −42 app/Http/Controllers/TimeController.php
  27. +37 −25 app/Http/Kernel.php
  28. +0 −51 app/Http/Middleware/Authenticate.php
  29. +0 −30 app/Http/Middleware/BackTo.php
  30. +5 −6 app/Http/Middleware/EncryptCookies.php
  31. +7 −29 app/Http/Middleware/RedirectIfAuthenticated.php
  32. +0 −29 app/Http/Middleware/Returnable.php
  33. +18 −0 app/Http/Middleware/TrimStrings.php
  34. +29 −0 app/Http/Middleware/TrustProxies.php
  35. +5 −6 app/Http/Middleware/VerifyCsrfToken.php
  36. +4 −2 app/Http/Requests/ClientRequest.php
  37. +30 −0 app/Http/Requests/InvoiceRequest.php
  38. +8 −8 app/Http/Requests/ProjectRequest.php
  39. +0 −12 app/Http/Requests/Request.php
  40. +0 −83 app/Http/routes.php
  41. +48 −36 app/Invoice.php
  42. +0 −17 app/Jobs/Job.php
  43. 0 app/Listeners/.gitkeep
  44. 0 app/Policies/.gitkeep
  45. +6 −3 app/Providers/AppServiceProvider.php
  46. +11 −11 app/Providers/AuthServiceProvider.php
  47. +21 −0 app/Providers/BroadcastServiceProvider.php
  48. +0 −40 app/Providers/DatabaseServiceProvider.php
  49. +10 −22 app/Providers/EventServiceProvider.php
  50. +44 −18 app/Providers/RouteServiceProvider.php
  51. +24 −14 app/Time.php
  52. +46 −0 app/Traits/AsMenu.php
  53. +35 −61 app/User.php
  54. +4 −2 artisan
  55. +0 −34 bootstrap/autoload.php
  56. +0 −28 build.xml
  57. +30 −29 composer.json
  58. +1,584 −1,524 composer.lock
  59. +78 −50 config/app.php
  60. +60 −25 config/auth.php
  61. +13 −3 config/broadcasting.php
  62. +20 −5 config/cache.php
  63. +0 −35 config/compile.php
  64. +47 −20 config/database.php
  65. +0 −170 config/debugbar.php
  66. +16 −33 config/filesystems.php
  67. +17 −18 config/mail.php
  68. +15 −23 config/queue.php
  69. +8 −8 config/services.php
  70. +48 −4 config/session.php
  71. +1 −1 config/view.php
  72. +18 −0 database/factories/ClientFactory.php
  73. +32 −0 database/factories/InvoiceFactory.php
  74. +0 −106 database/factories/ModelFactory.php
  75. +16 −0 database/factories/ProjectFactory.php
  76. +12 −0 database/factories/TimeFactory.php
  77. +23 −0 database/factories/UserFactory.php
  78. +10 −15 database/migrations/2014_10_12_000000_create_users_table.php
  79. +7 −12 database/migrations/2014_10_12_100000_create_password_resets_table.php
  80. +1 −6 database/seeds/DatabaseSeeder.php
  81. +29 −35 database/seeds/FakeSeeder.php
  82. +0 −16 gulpfile.js
  83. +13,833 −0 package-lock.json
  84. +22 −20 package.json
  85. +0 −64 phpcs.xml
  86. +0 −29 phpmd.xml
  87. +0 −5 phpspec.yml
  88. +10 −7 phpunit.xml
  89. +7 −2 public/.htaccess
  90. +8,360 −0 public/css/app.css
  91. BIN public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot
  92. +288 −0 public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg
  93. BIN public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf
  94. BIN public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff
  95. BIN public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2
  96. +7 −4 public/index.php
  97. +60,710 −0 public/js/app.js
  98. +0 −14 public/js/autofill-hint.js
  99. +0 −57 public/js/autofill.js
  100. +0 −7 public/js/bootstrap.min.js
  101. +0 −4 public/js/jquery.min.js
  102. +0 −86 public/js/pickable.js
  103. +0 −38 public/js/prefill.js
  104. +0 −14 public/js/searchby.js
  105. +0 −3 public/js/select2.min.js
  106. +0 −1,524 public/js/vue-resource.js
  107. +0 −7 public/js/vue-resource.min.js
  108. +0 −8,326 public/js/vue.js
  109. +0 −8 public/js/vue.min.js
  110. +4 −0 public/mix-manifest.json
  111. +23 −0 public/web.config
  112. +20 −0 resources/assets/js/app.js
  113. +55 −0 resources/assets/js/bootstrap.js
  114. +46 −0 resources/assets/js/components/Autofill.vue
  115. +35 −0 resources/assets/js/components/AutofillHint.vue
  116. +60 −0 resources/assets/js/components/FacetSearch.vue
  117. +160 −0 resources/assets/js/components/Pickable.vue
  118. +38 −0 resources/assets/sass/_variables.scss
  119. +10 −114 resources/assets/sass/app.scss
  120. +1 −1 resources/lang/en/pagination.php
  121. +1 −1 resources/lang/en/passwords.php
  122. +13 −1 resources/lang/en/validation.php
  123. +64 −17 resources/views/auth/login.blade.php
  124. +47 −0 resources/views/auth/passwords/email.blade.php
  125. +70 −0 resources/views/auth/passwords/reset.blade.php
  126. +71 −31 resources/views/auth/register.blade.php
  127. +38 −0 resources/views/client/form.blade.php
  128. +11 −0 resources/views/client/list.blade.php
  129. +71 −0 resources/views/client/show.blade.php
  130. +38 −0 resources/views/client/table.blade.php
  131. +0 −49 resources/views/clients/form.blade.php
  132. +0 −60 resources/views/clients/list.blade.php
  133. +0 −110 resources/views/clients/show.blade.php
  134. +0 −17 resources/views/dashboard/show.blade.php
  135. +0 −47 resources/views/errors/503.blade.php
  136. +23 −0 resources/views/home.blade.php
  137. +9 −35 resources/views/{invoices → invoice}/form.blade.php
  138. +15 −0 resources/views/invoice/list.blade.php
  139. +6 −22 resources/views/{invoices/list.blade.php → invoice/table.blade.php}
  140. +94 −0 resources/views/layouts/app.blade.php
  141. +0 −50 resources/views/layouts/master.blade.php
  142. +5 −0 resources/views/partials/delete.blade.php
  143. +3 −0 resources/views/partials/empty-message.blade.php
  144. +10 −54 resources/views/partials/formgroup-date.blade.php
  145. +13 −4 resources/views/partials/formgroup-menu.blade.php
  146. +1 −1 resources/views/partials/formgroup-standard.blade.php
  147. +5 −1 resources/views/partials/formgroup-textarea.blade.php
  148. +4 −44 resources/views/partials/formgroup-time.blade.php
  149. +3 −0 resources/views/partials/pagination.blade.php
  150. +5 −0 resources/views/partials/save-button.blade.php
  151. +4 −22 resources/views/partials/search.blade.php
  152. +4 −6 resources/views/partials/timestamps-footer.blade.php
  153. +26 −0 resources/views/project/form.blade.php
  154. +11 −0 resources/views/project/list.blade.php
  155. +47 −0 resources/views/project/show.blade.php
  156. +34 −0 resources/views/project/table.blade.php
  157. +0 −45 resources/views/projects/form.blade.php
  158. +0 −51 resources/views/projects/list.blade.php
  159. +0 −49 resources/views/projects/show.blade.php
  160. +25 −49 resources/views/time/form.blade.php
  161. +6 −58 resources/views/time/list.blade.php
  162. +47 −0 resources/views/time/table.blade.php
  163. 0 resources/views/vendor/.gitkeep
  164. +18 −0 routes/api.php
  165. +16 −0 routes/channels.php
  166. +18 −0 routes/console.php
  167. +21 −0 routes/web.php
  168. +4 −2 server.php
  169. +2 −1 storage/app/.gitignore
  170. +2 −0 storage/app/public/.gitignore
  171. +1 −0 storage/framework/.gitignore
  172. +1 −1 storage/framework/cache/.gitignore
  173. +2 −0 storage/framework/testing/.gitignore
  174. +25 −0 tests/CreatesApplication.php
  175. +0 −16 tests/ExampleTest.php
  176. +21 −0 tests/Feature/ExampleTest.php
  177. +5 −20 tests/TestCase.php
  178. +19 −0 tests/Unit/ExampleTest.php
  179. +15 −0 webpack.mix.js
  180. +2 −2 workspace.sh
@@ -1,19 +1,35 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_KEY=SomeRandomString
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_HOST=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
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

This file was deleted.

Oops, something went wrong.
@@ -1,3 +1,5 @@
* text=auto
*.css linguist-vendored
*.less linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
@@ -1,9 +1,18 @@
.DS_Store
vendor
node_modules
._*
.\#*
\#*
TAGS
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
*.sqlite
public/css
storage/debugbar
reports
.php_cs.cache
75 .php_cs

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,7 @@
.PHONY: dummy
fakeseed: dummy
rm toils.sqlite
touch toils.sqlite
php artisan migrate
php artisan db:seed --class=FakeSeeder
@@ -79,8 +79,7 @@ public static function listing(Builder $builder)
'clients.*,
count(distinct projects.id) as projectCount,
coalesce(sum(times.minutes), 0) as totalTime,
max(times.start) as latestTime,
min(times.start) as earliestTime'
max(times.start) as latestTime'
);
$builder = $builder->leftJoin(
@@ -143,26 +142,18 @@ public function projects()
*/
public function invoices()
{
$query = Invoice::leftJoin(
'projects',
'invoices.project_id',
'=',
'projects.id'
);
$query->select('invoices.*');
$query->join(
'clients',
'projects.client_id',
'=',
'clients.id'
);
$query->where('clients.id', $this->getKey());
return $query;
return $this->hasManyThrough('App\Invoice', 'App\Project');
}
/**
* Time entries associated with the client.
*
* @return Builder
*/
public function time()
{
return $this->hasManyThrough('App\Time', 'App\Project');
}
/**
* Human readable string for the value of the active flag.

This file was deleted.

Oops, something went wrong.
@@ -5,9 +5,6 @@
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
/**
* Standard Laravel Kernel class.
*/
class Kernel extends ConsoleKernel
{
/**
@@ -16,17 +13,30 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected $commands = [
\App\Console\Commands\Inspire::class,
//
];
/**
* Define the application's command schedule.
*
* @param Schedule $schedule The schedule instance
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('inspire')
->hourly();
// $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');
}
}

This file was deleted.

Oops, something went wrong.
@@ -3,56 +3,51 @@
namespace App\Exceptions;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
/**
* Standard Laravel exception handler class.
*/
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
HttpException::class,
ModelNotFoundException::class,
//
];
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param Exception $e The exception instance
*
* @return Response
* @param \Exception $exception
* @return void
*/
public function report(Exception $e)
public function report(Exception $exception)
{
return parent::report($e);
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param Request $request The incoming request
* @param Exception $e The exception
*
* @return Response
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
public function render($request, Exception $exception)
{
if ($e instanceof ModelNotFoundException) {
$e = new NotFoundHttpException($e->getMessage(), $e);
}
return parent::render($request, $e);
return parent::render($request, $exception);
}
}
@@ -63,7 +63,7 @@ public static function phoneUrl($value)
$plainValue = preg_replace('/[^0-9x\#*]/', null, $value);
try {
$formattedValue = phone_format($plainValue, 'US');
$formattedValue = phone($plainValue, 'US')->formatInternational();
} catch (Exception $e) {
$formattedValue = $plainValue;
}
Oops, something went wrong.

0 comments on commit 0c59a5a

Please sign in to comment.