Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fazo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nuriddin
fazo
Commits
a38568f2
Commit
a38568f2
authored
Nov 15, 2019
by
Shahzod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fucking Caotcha...
parent
fde644ec
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
21 deletions
+61
-21
workspace.xml
.idea/workspace.xml
+21
-7
FeedbackController.php
app/Http/Controllers/FeedbackController.php
+8
-1
HomeController.php
app/Http/Controllers/HomeController.php
+9
-6
captcha.php
config/captcha.php
+1
-1
contacts.blade.php
resources/views/contacts.blade.php
+19
-5
web.php
routes/web.php
+3
-1
No files found.
.idea/workspace.xml
View file @
a38568f2
...
...
@@ -3,12 +3,10 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"45142ad9-1f6f-4356-8738-3011f539d65e"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/Http/Controllers/
Auth/LoginController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/Http/Controllers/Auth/Login
Controller.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/Http/Controllers/
FeedbackController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/Http/Controllers/Feedback
Controller.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/Http/Controllers/HomeController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/Http/Controllers/HomeController.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/composer.lock"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/composer.lock"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/captcha.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/captcha.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/resources/views/main.blade.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/resources/views/main.blade.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/resources/views/pages/terms.blade.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/resources/views/pages/terms.blade.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/resources/views/contacts.blade.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/resources/views/contacts.blade.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/routes/web.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/routes/web.php"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
...
...
@@ -39,6 +37,7 @@
</component>
<component
name=
"Git.Settings"
>
<option
name=
"RECENT_GIT_ROOT_PATH"
value=
"$PROJECT_DIR$"
/>
<option
name=
"UPDATE_TYPE"
value=
"MERGE"
/>
</component>
<component
name=
"PhpWorkspaceProjectConfiguration"
>
<include_path>
...
...
@@ -239,7 +238,7 @@
<workItem
from=
"1571336316933"
duration=
"11634000"
/>
<workItem
from=
"1571458855290"
duration=
"49658000"
/>
<workItem
from=
"1572018556391"
duration=
"40349000"
/>
<workItem
from=
"1573827723198"
duration=
"
5980
000"
/>
<workItem
from=
"1573827723198"
duration=
"
9495
000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"first commit (10/07/2019//11/;58)"
>
<created>
1570475345391
</created>
...
...
@@ -472,7 +471,21 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1572210547463
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"34"
/>
<task
id=
"LOCAL-00034"
summary=
"CaptchaPer"
>
<created>
1573833813364
</created>
<option
name=
"number"
value=
"00034"
/>
<option
name=
"presentableId"
value=
"LOCAL-00034"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1573833813364
</updated>
</task>
<task
id=
"LOCAL-00035"
summary=
"CaptchaPer"
>
<created>
1573835763654
</created>
<option
name=
"number"
value=
"00035"
/>
<option
name=
"presentableId"
value=
"LOCAL-00035"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1573835763654
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"36"
/>
<servers
/>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
...
@@ -522,7 +535,8 @@
<MESSAGE
value=
"fix bugs"
/>
<MESSAGE
value=
"video"
/>
<MESSAGE
value=
"Release 28.10.2019"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"Release 28.10.2019"
/>
<MESSAGE
value=
"CaptchaPer"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"CaptchaPer"
/>
</component>
<component
name=
"XDebuggerManager"
>
<breakpoint-manager>
...
...
app/Http/Controllers/FeedbackController.php
View file @
a38568f2
...
...
@@ -21,6 +21,9 @@ class FeedbackController extends Controller
*/
public
function
addGuest
(
Request
$request
)
{
$request
->
validate
([
'captcha'
=>
'required|captcha'
,
],
[
'captcha.captcha'
=>
'Неверный защитный код...'
]);
try
{
$feedback
=
new
Feedback
();
$feedback
->
name
=
$request
->
input
(
'name'
)
.
' '
.
$request
->
input
(
'last-name'
);
...
...
@@ -36,4 +39,8 @@ class FeedbackController extends Controller
return
redirect
()
->
back
()
->
with
(
'flash_success'
,
'Сообщение отправлено успешно.'
);
}
}
\ No newline at end of file
public
function
addGuestCaptcha
()
{
return
captcha_img
();
}
}
app/Http/Controllers/HomeController.php
View file @
a38568f2
...
...
@@ -5,7 +5,9 @@ namespace App\Http\Controllers;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Mail
;
use
Illuminate\Validation\Validator
;
//use Illuminate\Validation\Validator;
use
Validator
;
//use Illuminate\Support\Facades\Validator;
class
HomeController
extends
Controller
{
...
...
@@ -48,11 +50,12 @@ class HomeController extends Controller
public
function
sendMail
(
Request
$request
)
{
// $request->validate([
// 'captcha' => 'require|captcha',
// ], ['captcha.captcha' => 'Неверный защитный код...']);
//
// dd($request->all());
//dd($request->all());
$request
->
validate
([
'captcha'
=>
'required|captcha'
,
],
[
'captcha.captcha'
=>
'Неверный защитный код...'
]);
$name
=
$request
->
get
(
'name'
);
$lastname
=
$request
->
get
(
'lastname'
);
...
...
config/captcha.php
View file @
a38568f2
...
...
@@ -5,7 +5,7 @@ return [
'default'
=>
[
'length'
=>
6
,
'width'
=>
150
,
'height'
=>
56
,
'height'
=>
70
,
'quality'
=>
90
,
'math'
=>
false
,
],
...
...
resources/views/contacts.blade.php
View file @
a38568f2
...
...
@@ -9,9 +9,8 @@
<div class="
col
-
xs
-
12
col
-
md
-
9
col
-
lg
-
6
col
-
md
-
offset
-
2
col
-
lg
-
offset
-
3
">
<!--p.fw-l.h5.text-transform-none Enter your email address to receive all company news, special offers and other discount information.-->
<!-- RD Mailform-->
<form class="
rd
-
mailform
text
-
left
" data-form-output="
form
-
output
-
global
"
data-form-type="
forms
" method="
post
"
action="
{{
url
(
'/feedback/add'
)
}}
">
<form method="
post
"
action="
{{
route
(
'send.mail'
)
}}
">
@csrf
<div class="
row
row
-
10
">
<div class="
col
-
xs
-
12
col
-
sm
-
6
">
...
...
@@ -48,8 +47,23 @@
<textarea class="
form
-
input
" id="
forms
-
message
" name="
message
"
data-constraints="
@
Required
"></textarea>
</div>
</div>
<div class="
col
-
xs
-
3
text
-
right
" >
<div class="
captcha
">
<span style="
float
:
left
;
" >{!! captcha_img() !!} </span>
</div>
</div>
<div class="
col
-
xs
-
9
text
-
left
" >
<input id="
captcha
" type="
text
" class="
form
-
input
{{
$errors
->
has
(
'captcha'
)
?
' has-error'
:
''
}}
" name="
captcha
" placeholder="
Введите
код
с
картинки
" required>
@if (
$errors->has
('captcha'))
<span class="
invalid
-
feedback
">
<strong>{{
$errors->first
('captcha') }}</strong>
</span>
@endif
</div>
<div class="
col
-
xs
-
12
text
-
center
">
<div class="
col
-
xs
-
12
text
-
right
">
<button class="
btn
btn
-
primary
btn
-
sm
" type="
submit
">Отправить</button>
</div>
</div>
...
...
@@ -119,4 +133,4 @@
width="
1980
" height="
460
" frameborder="
0
" style="
border
:
0
" allowfullscreen></iframe>
</div>
</section>
@endsection
\ No newline at end of file
@endsection
routes/web.php
View file @
a38568f2
...
...
@@ -66,7 +66,9 @@ Route::get('/refresh', 'Auth\LoginController@refresh')->name('refresh');
//Route::post('/login', 'Auth\LoginController@refreshpost')->name('login');
Route
::
post
(
'/feedback/add'
,
'FeedbackController@addGuest'
);
/*Route::get('/feedback/add', 'FeedbackController@addGuestCaptcha');
Route::post('/feedback/add', 'FeedbackController@addGuest');*/
Route
::
post
(
'/send-mail'
,
'HomeController@sendMail'
)
->
name
(
'send.mail'
);
Route
::
get
(
'/send-mail'
,
'HomeController@sendMailGet'
);
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment