Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
philbates35 committed Jan 17, 2024
1 parent 245d7e1 commit 45ffc23
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
10 changes: 6 additions & 4 deletions app/Http/Middleware/Authenticate.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php

declare(strict_types=1);
<?php declare(strict_types=1);

namespace App\Http\Middleware;

Expand All @@ -9,11 +7,15 @@

class Authenticate extends Middleware
{



/**
* Get the path the user should be redirected to when they are not authenticated.
*/
protected function redirectTo(Request $request): ?string
{
return $request->expectsJson() ? null : route('login');
return
$request->expectsJson() ?null : route('login');
}
}
5 changes: 2 additions & 3 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class User extends Authenticatable
/**
* The attributes that are mass assignable.
*
* @var array<string>
* @var array<int, string>
*/
protected $fillable = [

Check failure on line 24 in app/Models/User.php

View workflow job for this annotation

GitHub Actions / phpstan

PHPDoc type array<int, string> of property App\Models\User::$fillable is not the same as PHPDoc type array<string> of overridden property Illuminate\Database\Eloquent\Model::$fillable.
'name',
Expand All @@ -33,8 +33,7 @@ class User extends Authenticatable
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
'password', 'remember_token',
];

/**
Expand Down
2 changes: 1 addition & 1 deletion resources/js/app.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import "./bootstrap";
import './bootstrap';
2 changes: 2 additions & 0 deletions resources/js/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/ExampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class ExampleTest extends TestCase
*/
public function test_that_true_is_true(): void
{
//$this->assertTrue(true);
$this->assertTrue(false);

Check failure on line 16 in tests/Unit/ExampleTest.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to method PHPUnit\Framework\Assert::assertTrue() with false will always evaluate to false.

Check failure on line 16 in tests/Unit/ExampleTest.php

View workflow job for this annotation

GitHub Actions / phpstan

Dynamic call to static method PHPUnit\Framework\Assert::assertTrue().
}
}

0 comments on commit 45ffc23

Please sign in to comment.