Commit 088323a40780c345e3e4f0724f15a2fb951f2bcb
1 parent
248330cb1e
Exists in
master
task-132687 telegram integration + links in FAQ
Showing 14 changed files with 467 additions and 53 deletions Side-by-side Diff
- .env.example
- app/Components/Integrations/Telegram/VacancyChannel.php
- app/Http/Controllers/Ad_jobsController.php
- app/Http/Controllers/MainController.php
- app/Models/Faq.php
- composer.json
- composer.lock
- config/services.php
- config/telegram.php
- public/css/style_may2024.css
- resources/views/admin/faq/form.blade.php
- resources/views/employers/faq.blade.php
- resources/views/employers/list_vacancy.blade.php
- routes/web.php
.env.example
1 | 1 | APP_NAME=Laravel |
2 | 2 | APP_ENV=local |
3 | -APP_KEY= | |
3 | +APP_KEY=base64:U2p8XpTThMOYELolzlhevl2YGmuVRyF+eVazcnclAUQ= | |
4 | 4 | APP_DEBUG=true |
5 | -APP_URL=http://localhost | |
5 | +APP_URL=http://rekamore.nologostudio.ru/ | |
6 | 6 | |
7 | 7 | LOG_CHANNEL=stack |
8 | 8 | LOG_DEPRECATIONS_CHANNEL=null |
... | ... | @@ -11,7 +11,7 @@ LOG_LEVEL=debug |
11 | 11 | DB_CONNECTION=mysql |
12 | 12 | DB_HOST=127.0.0.1 |
13 | 13 | DB_PORT=3306 |
14 | -DB_DATABASE=laravel | |
14 | +DB_DATABASE=rekamore | |
15 | 15 | DB_USERNAME=root |
16 | 16 | DB_PASSWORD= |
17 | 17 | |
... | ... | @@ -29,12 +29,12 @@ REDIS_PASSWORD=null |
29 | 29 | REDIS_PORT=6379 |
30 | 30 | |
31 | 31 | MAIL_MAILER=smtp |
32 | -MAIL_HOST=mailpit | |
33 | -MAIL_PORT=1025 | |
34 | -MAIL_USERNAME=null | |
35 | -MAIL_PASSWORD=null | |
36 | -MAIL_ENCRYPTION=null | |
37 | -MAIL_FROM_ADDRESS="hello@example.com" | |
32 | +MAIL_HOST=smtp.googlemail.com | |
33 | +MAIL_PORT=465 | |
34 | +MAIL_USERNAME=alarionov@nologostudio.ru | |
35 | +MAIL_PASSWORD="PwdSky10121984!" | |
36 | +MAIL_ENCRYPTION=ssl | |
37 | +MAIL_FROM_ADDRESS=alarionov@nologostudio.ru | |
38 | 38 | MAIL_FROM_NAME="${APP_NAME}" |
39 | 39 | |
40 | 40 | AWS_ACCESS_KEY_ID= |
... | ... | @@ -56,3 +56,8 @@ VITE_PUSHER_HOST="${PUSHER_HOST}" |
56 | 56 | VITE_PUSHER_PORT="${PUSHER_PORT}" |
57 | 57 | VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" |
58 | 58 | VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" |
59 | + | |
60 | +EMAIL_ADMIN=info@rekamore.su | |
61 | + | |
62 | +TELEGRAM_API_KEY= | |
63 | +TELEGRAM_GROUP_ID= |
app/Components/Integrations/Telegram/VacancyChannel.php
... | ... | @@ -0,0 +1,48 @@ |
1 | +<?php | |
2 | + | |
3 | +namespace App\Components\Integrations\Telegram; | |
4 | + | |
5 | +use App\Models\Ad_employer; | |
6 | +use Str; | |
7 | +use Telegram\Bot\Api; | |
8 | +use Telegram\Bot\Exceptions\TelegramSDKException; | |
9 | +use Telegram\Bot\Laravel\Facades\Telegram; | |
10 | +use Telegram\Bot\Objects\Update; | |
11 | + | |
12 | +class VacancyChannel | |
13 | +{ | |
14 | + private Api $botApi; | |
15 | + | |
16 | + public function __construct() | |
17 | + { | |
18 | + $this->botApi = Telegram::bot('channel_bot'); | |
19 | + } | |
20 | + | |
21 | + /** | |
22 | + * @throws TelegramSDKException | |
23 | + */ | |
24 | + public function sendVacancy(Ad_employer $vacancy): void | |
25 | + { | |
26 | + $updates = $this->botApi->getUpdates(); | |
27 | + /** @var Update $update*/ | |
28 | + $chatId = null; | |
29 | + foreach ($updates as $update) { | |
30 | + if ($update->myChatMember?->chat->title === config('services.telegram.chat_title')) { | |
31 | + $chatId = $update->myChatMember->chat->id; | |
32 | + } | |
33 | + } | |
34 | + if ($chatId === null) { | |
35 | + throw new TelegramSDKException('Cant locate group chat id'); | |
36 | + } | |
37 | + | |
38 | + $text = str_ireplace('<p>', '', $vacancy->text); | |
39 | + $text = str_ireplace('</p>', '', $text); | |
40 | + | |
41 | + $this->botApi->sendMessage([ | |
42 | + 'chat_id' => $chatId, | |
43 | + 'text' => $text, | |
44 | + 'disable_web_page_preview' => true, | |
45 | + 'parse_mode' => 'HTML' | |
46 | + ]); | |
47 | + } | |
48 | +} |
app/Http/Controllers/Ad_jobsController.php
... | ... | @@ -2,40 +2,17 @@ |
2 | 2 | |
3 | 3 | namespace App\Http\Controllers; |
4 | 4 | |
5 | -use App\Classes\RusDate; | |
6 | -use App\Classes\Tools; | |
7 | -use App\Http\Requests\FlotRequest; | |
8 | -use App\Http\Requests\MessagesRequiest; | |
9 | -use App\Http\Requests\VacancyRequestEdit; | |
10 | -use App\Http\Requests\VacansiaRequiest; | |
5 | +use App\Components\Integrations\Telegram\VacancyChannel; | |
11 | 6 | use App\Mail\MailSotrudnichestvo; |
12 | -use App\Mail\SendAllMessages; | |
13 | 7 | use App\Models\Ad_employer; |
14 | 8 | use App\Models\Ad_jobs; |
15 | -use App\Models\ad_response; | |
16 | 9 | use App\Models\Category; |
17 | -use App\Models\Education; | |
18 | 10 | use App\Models\Employer; |
19 | -use App\Models\employers_main; | |
20 | -use App\Models\Flot; | |
21 | 11 | use App\Models\Job_title; |
22 | -use App\Models\Like_vacancy; | |
23 | -use App\Models\Like_worker; | |
24 | -use App\Models\Message; | |
25 | -use App\Models\Positions; | |
26 | -use App\Models\Worker; | |
27 | -use Carbon\Carbon; | |
28 | -use Illuminate\Auth\Events\Registered; | |
29 | -use Illuminate\Database\Eloquent\Builder; | |
30 | -use Illuminate\Database\Eloquent\Model; | |
31 | -use Illuminate\Foundation\Auth\User; | |
12 | +use http\Exception\RuntimeException; | |
13 | +use Illuminate\Http\RedirectResponse; | |
32 | 14 | use Illuminate\Http\Request; |
33 | -use Illuminate\Support\Facades\Auth; | |
34 | -use Illuminate\Support\Facades\Hash; | |
35 | -use Illuminate\Support\Facades\Mail; | |
36 | -use Illuminate\Support\Facades\Storage; | |
37 | -use App\Models\User as User_Model; | |
38 | -use Illuminate\Support\Facades\Validator; | |
15 | +use Telegram\Bot\Exceptions\TelegramSDKException; | |
39 | 16 | |
40 | 17 | class Ad_jobsController extends Controller |
41 | 18 | { |
... | ... | @@ -126,4 +103,21 @@ class Ad_jobsController extends Controller |
126 | 103 | $ad_job->delete(); |
127 | 104 | return redirect()->route('employer.vacancy_list'); |
128 | 105 | } |
106 | + | |
107 | + /** | |
108 | + * @throws TelegramSDKException | |
109 | + */ | |
110 | + public function sendVacancyToSocial(string $social, Ad_employer $vacancy): RedirectResponse | |
111 | + { | |
112 | + switch ($social) { | |
113 | + case 'tg': | |
114 | + $handler = new VacancyChannel(); | |
115 | + break; | |
116 | + default: | |
117 | + throw new RuntimeException('Unkown social'); | |
118 | + } | |
119 | + | |
120 | + $handler->sendVacancy($vacancy); | |
121 | + return response()->redirectTo(route('employer.vacancy_list')); | |
122 | + } | |
129 | 123 | } |
app/Http/Controllers/MainController.php
... | ... | @@ -157,7 +157,7 @@ class MainController extends Controller |
157 | 157 | $Data->where('job_title_id', $request->get('job')); |
158 | 158 | } |
159 | 159 | |
160 | - $Data->leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id') | |
160 | + $Data = $Data->leftJoin('ad_jobs', 'ad_jobs.job_title_id', '=', 'job_titles.id') | |
161 | 161 | ->join('categories', 'categories.id', '=', 'job_titles.position_id') |
162 | 162 | ->groupBy('job_titles.id') |
163 | 163 | ->orderBy('categories.id') |
app/Models/Faq.php
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | namespace App\Models; |
4 | 4 | |
5 | 5 | use Illuminate\Database\Eloquent\Model; |
6 | +use Illuminate\Support\Facades\Blade; | |
6 | 7 | |
7 | 8 | /** |
8 | 9 | * @property string $question |
... | ... | @@ -16,4 +17,10 @@ class Faq extends Model |
16 | 17 | 'created_at', |
17 | 18 | 'updated_at' |
18 | 19 | ]; |
20 | + | |
21 | + protected static function boot() | |
22 | + { | |
23 | + parent::boot(); | |
24 | + Blade::withoutDoubleEncoding(); | |
25 | + } | |
19 | 26 | } |
composer.json
composer.lock
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", |
5 | 5 | "This file is @generated automatically" |
6 | 6 | ], |
7 | - "content-hash": "4b776d8fe63faa11f5e875dbed55d528", | |
7 | + "content-hash": "a7eb5dd83a46d4d36bcfd6dc5e419b75", | |
8 | 8 | "packages": [ |
9 | 9 | { |
10 | 10 | "name": "akaunting/laravel-money", |
... | ... | @@ -2081,6 +2081,89 @@ |
2081 | 2081 | "time": "2021-10-07T12:57:01+00:00" |
2082 | 2082 | }, |
2083 | 2083 | { |
2084 | + "name": "irazasyed/telegram-bot-sdk", | |
2085 | + "version": "v3.14.0", | |
2086 | + "source": { | |
2087 | + "type": "git", | |
2088 | + "url": "https://github.com/irazasyed/telegram-bot-sdk.git", | |
2089 | + "reference": "c72ef585556578105c4d5cc56324575ef3677fd2" | |
2090 | + }, | |
2091 | + "dist": { | |
2092 | + "type": "zip", | |
2093 | + "url": "https://api.github.com/repos/irazasyed/telegram-bot-sdk/zipball/c72ef585556578105c4d5cc56324575ef3677fd2", | |
2094 | + "reference": "c72ef585556578105c4d5cc56324575ef3677fd2", | |
2095 | + "shasum": "" | |
2096 | + }, | |
2097 | + "require": { | |
2098 | + "ext-json": "*", | |
2099 | + "guzzlehttp/guzzle": "^7.5.1", | |
2100 | + "guzzlehttp/psr7": "^2.5", | |
2101 | + "illuminate/support": "9 - 11", | |
2102 | + "league/event": "^2.2 || ^3.0", | |
2103 | + "php": ">=8.0", | |
2104 | + "psr/container": "^1.1 || ^2.0", | |
2105 | + "psr/event-dispatcher": "^1.0" | |
2106 | + }, | |
2107 | + "require-dev": { | |
2108 | + "irazasyed/docgen": "^0.2", | |
2109 | + "pestphp/pest": "^1.22 || ^2.0", | |
2110 | + "php-parallel-lint/php-parallel-lint": "^1.3", | |
2111 | + "phpspec/prophecy": "^1.17", | |
2112 | + "phpspec/prophecy-phpunit": "^2.0", | |
2113 | + "rector/rector": "^0.16.0 || ^0.17.0 || ^0.18.0 || ^0.19.0 || ^1.0.0" | |
2114 | + }, | |
2115 | + "suggest": { | |
2116 | + "illuminate/container": "Hold dependencies to be injected in commands constructors", | |
2117 | + "irazasyed/larasupport": "Allows you to use any Laravel Package in Lumen by adding support!" | |
2118 | + }, | |
2119 | + "type": "library", | |
2120 | + "extra": { | |
2121 | + "branch-alias": { | |
2122 | + "dev-master": "3.0-dev" | |
2123 | + }, | |
2124 | + "laravel": { | |
2125 | + "aliases": { | |
2126 | + "Telegram": "Telegram\\Bot\\Laravel\\Facades\\Telegram" | |
2127 | + }, | |
2128 | + "providers": [ | |
2129 | + "Telegram\\Bot\\Laravel\\TelegramServiceProvider" | |
2130 | + ] | |
2131 | + } | |
2132 | + }, | |
2133 | + "autoload": { | |
2134 | + "psr-4": { | |
2135 | + "Telegram\\Bot\\": "src/" | |
2136 | + } | |
2137 | + }, | |
2138 | + "notification-url": "https://packagist.org/downloads/", | |
2139 | + "license": [ | |
2140 | + "BSD-3-Clause" | |
2141 | + ], | |
2142 | + "authors": [ | |
2143 | + { | |
2144 | + "name": "Irfaq Syed", | |
2145 | + "email": "github@lukonet.net", | |
2146 | + "homepage": "https://github.com/irazasyed" | |
2147 | + } | |
2148 | + ], | |
2149 | + "description": "The Unofficial Telegram Bot API PHP SDK", | |
2150 | + "homepage": "https://github.com/irazasyed/telegram-bot-sdk", | |
2151 | + "keywords": [ | |
2152 | + "laravel", | |
2153 | + "laravel telegram", | |
2154 | + "telegram", | |
2155 | + "telegram bot", | |
2156 | + "telegram bot api", | |
2157 | + "telegram php", | |
2158 | + "telegram sdk" | |
2159 | + ], | |
2160 | + "support": { | |
2161 | + "issues": "https://github.com/irazasyed/telegram-bot-sdk/issues", | |
2162 | + "source": "https://github.com/irazasyed/telegram-bot-sdk/tree/v3.14.0" | |
2163 | + }, | |
2164 | + "time": "2024-03-11T03:11:26+00:00" | |
2165 | + }, | |
2166 | + { | |
2084 | 2167 | "name": "laravel-lang/lang", |
2085 | 2168 | "version": "12.17.1", |
2086 | 2169 | "source": { |
... | ... | @@ -2798,6 +2881,65 @@ |
2798 | 2881 | "time": "2022-12-11T20:36:23+00:00" |
2799 | 2882 | }, |
2800 | 2883 | { |
2884 | + "name": "league/event", | |
2885 | + "version": "3.0.3", | |
2886 | + "source": { | |
2887 | + "type": "git", | |
2888 | + "url": "https://github.com/thephpleague/event.git", | |
2889 | + "reference": "ec38ff7ea10cad7d99a79ac937fbcffb9334c210" | |
2890 | + }, | |
2891 | + "dist": { | |
2892 | + "type": "zip", | |
2893 | + "url": "https://api.github.com/repos/thephpleague/event/zipball/ec38ff7ea10cad7d99a79ac937fbcffb9334c210", | |
2894 | + "reference": "ec38ff7ea10cad7d99a79ac937fbcffb9334c210", | |
2895 | + "shasum": "" | |
2896 | + }, | |
2897 | + "require": { | |
2898 | + "php": ">=7.2.0", | |
2899 | + "psr/event-dispatcher": "^1.0" | |
2900 | + }, | |
2901 | + "provide": { | |
2902 | + "psr/event-dispatcher-implementation": "1.0" | |
2903 | + }, | |
2904 | + "require-dev": { | |
2905 | + "friendsofphp/php-cs-fixer": "^2.16", | |
2906 | + "phpstan/phpstan": "^0.12.45", | |
2907 | + "phpunit/phpunit": "^8.5" | |
2908 | + }, | |
2909 | + "type": "library", | |
2910 | + "extra": { | |
2911 | + "branch-alias": { | |
2912 | + "dev-master": "3.0-dev" | |
2913 | + } | |
2914 | + }, | |
2915 | + "autoload": { | |
2916 | + "psr-4": { | |
2917 | + "League\\Event\\": "src/" | |
2918 | + } | |
2919 | + }, | |
2920 | + "notification-url": "https://packagist.org/downloads/", | |
2921 | + "license": [ | |
2922 | + "MIT" | |
2923 | + ], | |
2924 | + "authors": [ | |
2925 | + { | |
2926 | + "name": "Frank de Jonge", | |
2927 | + "email": "info@frenky.net" | |
2928 | + } | |
2929 | + ], | |
2930 | + "description": "Event package", | |
2931 | + "keywords": [ | |
2932 | + "emitter", | |
2933 | + "event", | |
2934 | + "listener" | |
2935 | + ], | |
2936 | + "support": { | |
2937 | + "issues": "https://github.com/thephpleague/event/issues", | |
2938 | + "source": "https://github.com/thephpleague/event/tree/3.0.3" | |
2939 | + }, | |
2940 | + "time": "2024-09-04T16:06:53+00:00" | |
2941 | + }, | |
2942 | + { | |
2801 | 2943 | "name": "league/flysystem", |
2802 | 2944 | "version": "3.15.1", |
2803 | 2945 | "source": { |
config/services.php
config/telegram.php
... | ... | @@ -0,0 +1,205 @@ |
1 | +<?php | |
2 | + | |
3 | +use Telegram\Bot\Commands\HelpCommand; | |
4 | + | |
5 | +return [ | |
6 | + /* | |
7 | + |-------------------------------------------------------------------------- | |
8 | + | Your Telegram Bots | |
9 | + |-------------------------------------------------------------------------- | |
10 | + | You may use multiple bots at once using the manager class. Each bot | |
11 | + | that you own should be configured here. | |
12 | + | | |
13 | + | Here are each of the telegram bots config parameters. | |
14 | + | | |
15 | + | Supported Params: | |
16 | + | | |
17 | + | - name: The *personal* name you would like to refer to your bot as. | |
18 | + | | |
19 | + | - token: Your Telegram Bot's Access Token. | |
20 | + Refer for more details: https://core.telegram.org/bots#botfather | |
21 | + | Example: (string) '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11'. | |
22 | + | | |
23 | + | - commands: (Optional) Commands to register for this bot, | |
24 | + | Supported Values: "Command Group Name", "Shared Command Name", "Full Path to Class". | |
25 | + | Default: Registers Global Commands. | |
26 | + | Example: (array) [ | |
27 | + | 'admin', // Command Group Name. | |
28 | + | 'status', // Shared Command Name. | |
29 | + | Acme\Project\Commands\BotFather\HelloCommand::class, | |
30 | + | Acme\Project\Commands\BotFather\ByeCommand::class, | |
31 | + | ] | |
32 | + */ | |
33 | + 'bots' => [ | |
34 | + 'channel_bot' => [ | |
35 | + 'token' => env('TELEGRAM_BOT_API_KEY'), | |
36 | + ] | |
37 | + ], | |
38 | + | |
39 | + /* | |
40 | + |-------------------------------------------------------------------------- | |
41 | + | Default Bot Name | |
42 | + |-------------------------------------------------------------------------- | |
43 | + | | |
44 | + | Here you may specify which of the bots you wish to use as | |
45 | + | your default bot for regular use. | |
46 | + | | |
47 | + */ | |
48 | + 'default' => 'channel_bot', | |
49 | + | |
50 | + /* | |
51 | + |-------------------------------------------------------------------------- | |
52 | + | Asynchronous Requests [Optional] | |
53 | + |-------------------------------------------------------------------------- | |
54 | + | | |
55 | + | When set to True, All the requests would be made non-blocking (Async). | |
56 | + | | |
57 | + | Default: false | |
58 | + | Possible Values: (Boolean) "true" OR "false" | |
59 | + | | |
60 | + */ | |
61 | + 'async_requests' => env('TELEGRAM_ASYNC_REQUESTS', false), | |
62 | + | |
63 | + /* | |
64 | + |-------------------------------------------------------------------------- | |
65 | + | HTTP Client Handler [Optional] | |
66 | + |-------------------------------------------------------------------------- | |
67 | + | | |
68 | + | If you'd like to use a custom HTTP Client Handler. | |
69 | + | Should be an instance of \Telegram\Bot\HttpClients\HttpClientInterface | |
70 | + | | |
71 | + | Default: GuzzlePHP | |
72 | + | | |
73 | + */ | |
74 | + 'http_client_handler' => null, | |
75 | + | |
76 | + /* | |
77 | + |-------------------------------------------------------------------------- | |
78 | + | Base Bot Url [Optional] | |
79 | + |-------------------------------------------------------------------------- | |
80 | + | | |
81 | + | If you'd like to use a custom Base Bot Url. | |
82 | + | Should be a local bot api endpoint or a proxy to the telegram api endpoint | |
83 | + | | |
84 | + | Default: https://api.telegram.org/bot | |
85 | + | | |
86 | + */ | |
87 | + 'base_bot_url' => null, | |
88 | + | |
89 | + /* | |
90 | + |-------------------------------------------------------------------------- | |
91 | + | Resolve Injected Dependencies in commands [Optional] | |
92 | + |-------------------------------------------------------------------------- | |
93 | + | | |
94 | + | Using Laravel's IoC container, we can easily type hint dependencies in | |
95 | + | our command's constructor and have them automatically resolved for us. | |
96 | + | | |
97 | + | Default: true | |
98 | + | Possible Values: (Boolean) "true" OR "false" | |
99 | + | | |
100 | + */ | |
101 | + 'resolve_command_dependencies' => true, | |
102 | + | |
103 | + /* | |
104 | + |-------------------------------------------------------------------------- | |
105 | + | Register Telegram Global Commands [Optional] | |
106 | + |-------------------------------------------------------------------------- | |
107 | + | | |
108 | + | If you'd like to use the SDK's built in command handler system, | |
109 | + | You can register all the global commands here. | |
110 | + | | |
111 | + | Global commands will apply to all the bots in system and are always active. | |
112 | + | | |
113 | + | The command class should extend the \Telegram\Bot\Commands\Command class. | |
114 | + | | |
115 | + | Default: The SDK registers, a help command which when a user sends /help | |
116 | + | will respond with a list of available commands and description. | |
117 | + | | |
118 | + */ | |
119 | + 'commands' => [ | |
120 | + HelpCommand::class, | |
121 | + ], | |
122 | + | |
123 | + /* | |
124 | + |-------------------------------------------------------------------------- | |
125 | + | Command Groups [Optional] | |
126 | + |-------------------------------------------------------------------------- | |
127 | + | | |
128 | + | You can organize a set of commands into groups which can later, | |
129 | + | be re-used across all your bots. | |
130 | + | | |
131 | + | You can create 4 types of groups: | |
132 | + | 1. Group using full path to command classes. | |
133 | + | 2. Group using shared commands: Provide the key name of the shared command | |
134 | + | and the system will automatically resolve to the appropriate command. | |
135 | + | 3. Group using other groups of commands: You can create a group which uses other | |
136 | + | groups of commands to bundle them into one group. | |
137 | + | 4. You can create a group with a combination of 1, 2 and 3 all together in one group. | |
138 | + | | |
139 | + | Examples shown below are by the group type for you to understand each of them. | |
140 | + */ | |
141 | + 'command_groups' => [ | |
142 | + /* // Group Type: 1 | |
143 | + 'commmon' => [ | |
144 | + Acme\Project\Commands\TodoCommand::class, | |
145 | + Acme\Project\Commands\TaskCommand::class, | |
146 | + ], | |
147 | + */ | |
148 | + | |
149 | + /* // Group Type: 2 | |
150 | + 'subscription' => [ | |
151 | + 'start', // Shared Command Name. | |
152 | + 'stop', // Shared Command Name. | |
153 | + ], | |
154 | + */ | |
155 | + | |
156 | + /* // Group Type: 3 | |
157 | + 'auth' => [ | |
158 | + Acme\Project\Commands\LoginCommand::class, | |
159 | + Acme\Project\Commands\SomeCommand::class, | |
160 | + ], | |
161 | + | |
162 | + 'stats' => [ | |
163 | + Acme\Project\Commands\UserStatsCommand::class, | |
164 | + Acme\Project\Commands\SubscriberStatsCommand::class, | |
165 | + Acme\Project\Commands\ReportsCommand::class, | |
166 | + ], | |
167 | + | |
168 | + 'admin' => [ | |
169 | + 'auth', // Command Group Name. | |
170 | + 'stats' // Command Group Name. | |
171 | + ], | |
172 | + */ | |
173 | + | |
174 | + /* // Group Type: 4 | |
175 | + 'myBot' => [ | |
176 | + 'admin', // Command Group Name. | |
177 | + 'subscription', // Command Group Name. | |
178 | + 'status', // Shared Command Name. | |
179 | + 'Acme\Project\Commands\BotCommand' // Full Path to Command Class. | |
180 | + ], | |
181 | + */ | |
182 | + ], | |
183 | + | |
184 | + /* | |
185 | + |-------------------------------------------------------------------------- | |
186 | + | Shared Commands [Optional] | |
187 | + |-------------------------------------------------------------------------- | |
188 | + | | |
189 | + | Shared commands let you register commands that can be shared between, | |
190 | + | one or more bots across the project. | |
191 | + | | |
192 | + | This will help you prevent from having to register same set of commands, | |
193 | + | for each bot over and over again and make it easier to maintain them. | |
194 | + | | |
195 | + | Shared commands are not active by default, You need to use the key name to register them, | |
196 | + | individually in a group of commands or in bot commands. | |
197 | + | Think of this as a central storage, to register, reuse and maintain them across all bots. | |
198 | + | | |
199 | + */ | |
200 | + 'shared_commands' => [ | |
201 | + // 'start' => Acme\Project\Commands\StartCommand::class, | |
202 | + // 'stop' => Acme\Project\Commands\StopCommand::class, | |
203 | + // 'status' => Acme\Project\Commands\StatusCommand::class, | |
204 | + ], | |
205 | +]; |
public/css/style_may2024.css
resources/views/admin/faq/form.blade.php
... | ... | @@ -98,3 +98,14 @@ |
98 | 98 | </div> |
99 | 99 | </div> |
100 | 100 | </div> |
101 | + | |
102 | + | |
103 | +<script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script> | |
104 | + | |
105 | +<script> | |
106 | + CKEDITOR.replace( 'answer', { | |
107 | + filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", | |
108 | + filebrowserImageUploadUrl: "{{ route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", | |
109 | + filebrowserUploadMethod: 'form' | |
110 | + }); | |
111 | +</script> |
resources/views/employers/faq.blade.php
... | ... | @@ -40,7 +40,9 @@ |
40 | 40 | </svg> |
41 | 41 | </i> |
42 | 42 | </button> |
43 | - <div class="faqs__item-body" style="white-space:break-spaces; word-break: break-word;">{{ $question->answer }}</div> | |
43 | + <div class="faqs__item-body" style="white-space:break-spaces; word-break: break-word;"> | |
44 | + {!! $question->answer !!} | |
45 | + </div> | |
44 | 46 | </div> |
45 | 47 | </div> |
46 | 48 | @endforeach |
... | ... | @@ -59,7 +61,9 @@ |
59 | 61 | </svg> |
60 | 62 | </i> |
61 | 63 | </button> |
62 | - <div class="faqs__item-body" style="white-space:break-spaces; word-break: break-word;">{{ $question->answer }}</div> | |
64 | + <div class="faqs__item-body" style="white-space:break-spaces; word-break: break-word;"> | |
65 | + {!! $question->answer !!} | |
66 | + </div> | |
63 | 67 | </div> |
64 | 68 | </div> |
65 | 69 | @endforeach |
resources/views/employers/list_vacancy.blade.php
... | ... | @@ -151,24 +151,12 @@ |
151 | 151 | </a> |
152 | 152 | @endif |
153 | 153 | @if ($Employer->social_is == 1) |
154 | - <a href="https://telegram.me/share/url?url={{ route('vacancie', ['vacancy' => $it->id]) }}&text={{ $it->text }}" class="table__controls-item"> | |
154 | + <a href="{{ route('employer.send-vacancy-to-social', ['social' => 'tg', 'vacancy' => $it->id]) }}" class="table__controls-item"> | |
155 | 155 | <svg> |
156 | 156 | <use xlink:href="{{ asset('images/sprite.svg#tg') }}"></use> |
157 | 157 | </svg> |
158 | 158 | </a> |
159 | 159 | @endif |
160 | - <!--<a class="btn_telegram_share table__controls-item" href="https://telegram.me/share/url?url=ВАШ_URL&text={{ $it->name }}"> | |
161 | - <svg> | |
162 | - <use xlink:href=" asset('images/sprite.svg#arrow-radius') }}"></use> | |
163 | - </svg> | |
164 | - </a>--> | |
165 | - | |
166 | - <!--<button type="button" class="table__controls-item"> | |
167 | - <svg> | |
168 | - <use xlink:href=" asset('images/sprite.svg#tg') }}"></use> | |
169 | - </svg> | |
170 | - </button> | |
171 | - --> | |
172 | 160 | </span> |
173 | 161 | </td> |
174 | 162 | </tr> |
routes/web.php
... | ... | @@ -603,6 +603,9 @@ Route::group([ |
603 | 603 | Route::post('cabinet/flot_edit/{Flot}', [EmployerController::class, 'update_flot'])->name('update_flot_save'); |
604 | 604 | Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); |
605 | 605 | |
606 | + Route::get('social/{social}/{vacancy}', [Ad_jobsController::class, 'sendVacancyToSocial']) | |
607 | + ->name('send-vacancy-to-social'); | |
608 | + | |
606 | 609 | // 2 страница - Добавление вакансий |
607 | 610 | Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie'); |
608 | 611 | Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save'); |