Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3da8cda6
authored
Apr 05, 2023
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправлен https production
1 parent
2c4b040a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
2 deletions
app/Http/Controllers/Auth/LoginController.php
app/Providers/AppServiceProvider.php
app/Service/AuthenticatesUsers.php
resources/views/app.blade.php
app/Http/Controllers/Auth/LoginController.php
View file @
3da8cda
...
@@ -4,7 +4,7 @@ namespace App\Http\Controllers\Auth;
...
@@ -4,7 +4,7 @@ namespace App\Http\Controllers\Auth;
use
App\Http\Controllers\Controller
;
use
App\Http\Controllers\Controller
;
use
App\Providers\RouteServiceProvider
;
use
App\Providers\RouteServiceProvider
;
use
Illuminate\Foundation\Auth
\AuthenticatesUsers
;
use
App\Service
\AuthenticatesUsers
;
use
Inertia\Inertia
;
use
Inertia\Inertia
;
class
LoginController
extends
Controller
class
LoginController
extends
Controller
...
...
app/Providers/AppServiceProvider.php
View file @
3da8cda
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
App\Providers
;
namespace
App\Providers
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Facades\URL
;
use
Illuminate\Support\ServiceProvider
;
use
Illuminate\Support\ServiceProvider
;
use
League\Glide\Server
;
use
League\Glide\Server
;
...
@@ -34,6 +35,8 @@ class AppServiceProvider extends ServiceProvider
...
@@ -34,6 +35,8 @@ class AppServiceProvider extends ServiceProvider
{
{
if
(
app
()
->
environment
()
!==
'production'
)
{
if
(
app
()
->
environment
()
!==
'production'
)
{
app
()
->
register
(
\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider
::
class
);
app
()
->
register
(
\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider
::
class
);
}
else
{
URL
::
forceScheme
(
'https'
);
}
}
}
}
}
}
app/Service/AuthenticatesUsers.php
0 → 100644
View file @
3da8cda
<?php
namespace
App\Service
;
use
Illuminate\Foundation\Auth\AuthenticatesUsers
as
LaravelAuthenticatesUsers
;
use
Illuminate\Http\JsonResponse
;
use
Illuminate\Http\Request
;
trait
AuthenticatesUsers
{
use
LaravelAuthenticatesUsers
;
/**
* Send the response after the user was authenticated.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
*/
protected
function
sendLoginResponse
(
Request
$request
)
{
$request
->
session
()
->
regenerate
();
$this
->
clearLoginAttempts
(
$request
);
if
(
$response
=
$this
->
authenticated
(
$request
,
$this
->
guard
()
->
user
()))
{
return
$response
;
}
return
$request
->
wantsJson
()
?
new
JsonResponse
([],
204
)
:
redirect
(
$this
->
redirectPath
());
}
}
\ No newline at end of file
resources/views/app.blade.php
View file @
3da8cda
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<head>
<head>
<meta
charset=
"UTF-8"
/>
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<link
href=
"{{
asset
('css/app.css') }}"
rel=
"stylesheet"
>
<link
href=
"{{
mix
('css/app.css') }}"
rel=
"stylesheet"
>
{{-- Inertia --}}
{{-- Inertia --}}
<script
src=
"https://polyfill.io/v3/polyfill.min.js?features=smoothscroll,NodeList.prototype.forEach,Promise,Object.values,Object.assign"
defer
></script>
<script
src=
"https://polyfill.io/v3/polyfill.min.js?features=smoothscroll,NodeList.prototype.forEach,Promise,Object.values,Object.assign"
defer
></script>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment