Skip to content

Commit

Permalink
Merge pull request #48 from dsbilling/shift-76645
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling authored Dec 21, 2022
2 parents 3ce4b5f + 07c03a8 commit 67937a5
Show file tree
Hide file tree
Showing 60 changed files with 1,672 additions and 1,570 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1']
php-versions: [8.1]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
9 changes: 0 additions & 9 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@

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

/**
* Define the application's command schedule.
*
Expand Down
15 changes: 12 additions & 3 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,28 @@

class Handler extends ExceptionHandler
{
/**
* A list of exception types with their corresponding custom log levels.
*
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
*/
protected $levels = [
//
];

/**
* A list of the exception types that are not reported.
*
* @var array
* @var array<int, class-string<\Throwable>>
*/
protected $dontReport = [
//
];

/**
* A list of the inputs that are never flashed for validation exceptions.
* A list of the inputs that are never flashed to the session on validation exceptions.
*
* @var array
* @var array<int, string>
*/
protected $dontFlash = [
'current_password',
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Kernel extends HttpKernel
protected $middleware = [
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Fruitcake\Cors\HandleCors::class,
\Illuminate\Http\Middleware\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
Expand Down Expand Up @@ -56,6 +56,7 @@ class Kernel extends HttpKernel
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Middleware/TrimStrings.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TrimStrings extends Middleware
/**
* The names of the attributes that should not be trimmed.
*
* @var array
* @var array<int, string>
*/
protected $except = [
'current_password',
Expand Down
11 changes: 8 additions & 3 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace App\Http\Middleware;

use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;

class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array|string|null
* @var array<int, string>|string|null
*/
protected $proxies;

Expand All @@ -19,5 +19,10 @@ class TrustProxies extends Middleware
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}
22 changes: 22 additions & 0 deletions app/Http/Middleware/ValidateSignature.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace App\Http\Middleware;

use Illuminate\Routing\Middleware\ValidateSignature as Middleware;

class ValidateSignature extends Middleware
{
/**
* The names of the query string parameters that should be ignored.
*
* @var array<int, string>
*/
protected $except = [
// 'fbclid',
// 'utm_campaign',
// 'utm_content',
// 'utm_medium',
// 'utm_source',
// 'utm_term',
];
}
5 changes: 4 additions & 1 deletion app/Models/Certification.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class Certification extends Model
'file_path',
];

protected $dates = ['issued_at', 'expiration_at'];
protected $casts = [
'issued_at' => 'datetime',
'expiration_at' => 'datetime',
];

/**
* Get the company for the certification.
Expand Down
4 changes: 3 additions & 1 deletion app/Models/Course.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class Course extends Model
'file_path',
];

protected $dates = ['issued_at'];
protected $casts = [
'issued_at' => 'datetime',
];

/**
* Get the company for the course.
Expand Down
5 changes: 4 additions & 1 deletion app/Models/Experience.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class Experience extends Model
'company_id',
];

protected $dates = ['started_at', 'ended_at'];
protected $casts = [
'started_at' => 'datetime',
'ended_at' => 'datetime',
];

/**
* Get the company for the certification.
Expand Down
14 changes: 12 additions & 2 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
* The event to listener mappings for the application.
*
* @var array
* @var array<class-string, array<int, class-string>>
*/
protected $listen = [
Registered::class => [
Expand All @@ -29,4 +29,14 @@ public function boot()
{
//
}

/**
* Determine if events and listeners should be automatically discovered.
*
* @return bool
*/
public function shouldDiscoverEvents()
{
return false;
}
}
19 changes: 1 addition & 18 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ class RouteServiceProvider extends ServiceProvider
*/
public const HOME = '/dashboard';

/**
* The controller namespace for the application.
*
* When present, controller route declarations will automatically be prefixed with this namespace.
*
* @var string|null
*/
// protected $namespace = 'App\\Http\\Controllers';

/**
* Define your route model bindings, pattern filters, etc.
*
Expand All @@ -40,18 +31,10 @@ public function boot()
$this->routes(function () {
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));

Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));

Route::namespace($this->namespace)
->group(base_path('routes/jetstream.php'));

Route::namespace($this->namespace)
->group(base_path('routes/fortify.php'));
});
}

Expand All @@ -63,7 +46,7 @@ public function boot()
protected function configureRateLimiting()
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
}
}
50 changes: 27 additions & 23 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,41 @@
"name": "danielrtrd/daniel.rtrd.no",
"type": "project",
"description": "Just my personal website",
"keywords": ["framework", "laravel"],
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^8.0",
"barryvdh/laravel-dompdf": "^2.0.0",
"cyrildewit/eloquent-viewable": "^6.0",
"cyrildewit/eloquent-viewable": "^6.1",
"doctrine/dbal": "^3.1",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"kilobyteno/laravel-user-guest-like": "^0.0.2",
"laravel/framework": "^8.40",
"laravel/jetstream": "^2.3",
"laravel/sanctum": "^2.6",
"laravel/tinker": "^2.5",
"livewire/livewire": "^2.0",
"guzzlehttp/guzzle": "^7.2",
"kilobyteno/laravel-user-guest-like": "^1.1",
"laravel/framework": "^9.45",
"laravel/jetstream": "^2.6",
"laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7",
"livewire/livewire": "^2.10",
"mtownsend/read-time": "^2.0",
"romanzipp/laravel-seo": "^2.3",
"spatie/laravel-honeypot": "^3.0",
"spatie/laravel-markdown": "^2.1",
"spatie/laravel-permission": "^4.1",
"spatie/laravel-tags": "^3.1"
"romanzipp/laravel-seo": "^2.4",
"spatie/laravel-honeypot": "^4.1",
"spatie/laravel-markdown": "^2.2",
"spatie/laravel-permission": "^5.5",
"spatie/laravel-tags": "^4.3"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.5",
"facade/ignition": "^2.5",
"barryvdh/laravel-debugbar": "^3.6",
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"laravel/pint": "^1.1",
"laravel/sail": "^1.15",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.3",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.2",
"phpunit/phpunit": "^9.3.3"
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.4"
},
"autoload": {
"psr-4": {
Expand All @@ -59,6 +60,9 @@
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
]
},
"extra": {
Expand Down
Loading

0 comments on commit 67937a5

Please sign in to comment.