From 45ffc23253ab14c885df48856462a7bab8f5336c Mon Sep 17 00:00:00 2001 From: Phil Bates Date: Wed, 17 Jan 2024 09:32:28 +0000 Subject: [PATCH] WIP --- app/Http/Middleware/Authenticate.php | 10 ++++++---- app/Models/User.php | 5 ++--- resources/js/app.ts | 2 +- resources/js/bootstrap.ts | 2 ++ tests/Unit/ExampleTest.php | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index cd4ebd3..6077ff1 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -1,6 +1,4 @@ -expectsJson() ? null : route('login'); + return + $request->expectsJson() ?null : route('login'); } } diff --git a/app/Models/User.php b/app/Models/User.php index 4708803..a020ba8 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -19,7 +19,7 @@ class User extends Authenticatable /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'name', @@ -33,8 +33,7 @@ class User extends Authenticatable * @var array */ protected $hidden = [ - 'password', - 'remember_token', + 'password', 'remember_token', ]; /** diff --git a/resources/js/app.ts b/resources/js/app.ts index 3103e5d..e59d6a0 100644 --- a/resources/js/app.ts +++ b/resources/js/app.ts @@ -1 +1 @@ -import "./bootstrap"; +import './bootstrap'; diff --git a/resources/js/bootstrap.ts b/resources/js/bootstrap.ts index 3960c84..9056bc3 100644 --- a/resources/js/bootstrap.ts +++ b/resources/js/bootstrap.ts @@ -8,6 +8,8 @@ import axios from "axios"; axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest"; +const foo: any = "lol"; + /** * Echo exposes an expressive API for subscribing to channels and listening * for events that are broadcast by Laravel. Echo and event broadcasting diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 19fe97c..adfbfcc 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -13,6 +13,6 @@ class ExampleTest extends TestCase */ public function test_that_true_is_true(): void { - //$this->assertTrue(true); + $this->assertTrue(false); } }