{{ $post->user->email }}
4 | @if(Cache::has('is_online' . $post->user->id)) 5 |Online
6 | @else 7 |Last seen {{ \Carbon\Carbon::parse($post->user->last_seen)->diffForHumans() }}
8 | @endif 9 |{{ $post->title }}
10 |{{ $post->text }}
13 |21 |
├── public ├── favicon.ico ├── robots.txt ├── js │ ├── lang.js │ ├── parsePDF.js │ ├── admin │ │ └── stats.js │ ├── api │ │ └── weather.js │ ├── register.js │ ├── autoria.js │ ├── post.js │ └── comment.js ├── .htaccess ├── css │ └── style.css └── index.php ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js ├── views │ ├── sendExcel.blade.php │ ├── components │ │ ├── weatherDay.blade.php │ │ ├── cars.blade.php │ │ ├── parsedItemPDF.blade.php │ │ ├── post.blade.php │ │ ├── comment.blade.php │ │ └── layout.blade.php │ ├── parsePDF.blade.php │ ├── home.blade.php │ ├── admin │ │ └── stats.blade.php │ ├── login.blade.php │ ├── api │ │ └── weather.blade.php │ ├── excel.blade.php │ ├── posts.blade.php │ ├── register.blade.php │ ├── pdf │ │ └── parsedFile.blade.php │ └── autoria.blade.php └── lang │ ├── en │ └── messages.php │ └── ru │ └── messages.php ├── database ├── .gitignore ├── seeders │ └── DatabaseSeeder.php ├── migrations │ ├── 2023_04_18_155640_create_cities_table.php │ ├── 2023_04_24_123437_add_last_seen_to_users_table.php │ ├── 2023_04_18_155631_create_states_table.php │ ├── 2023_04_20_110820_change_posts_id_in_comments_table.php │ ├── 2023_04_27_175131_add_twitter_id_column_to_users_table.php │ ├── 2023_04_28_101405_add_twitter_token_to_users_table.php │ ├── 2014_10_12_100000_create_password_reset_tokens_table.php │ ├── 2023_04_18_155518_create_countries_table.php │ ├── 2023_04_20_110228_add_comment_id_to_comments_table.php │ ├── 2023_04_07_143520_create_posts_table.php │ ├── 2023_04_10_101720_create_comments_table.php │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2023_04_20_154116_create_payments_table.php │ ├── 2023_05_02_145134_create_jobs_table.php │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ ├── 2023_04_18_173013_add_country_state_city_to_users_table.php │ └── 2023_04_20_154039_create_contracts_table.php └── factories │ └── UserFactory.php ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── .htaccess ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── app ├── Models │ ├── City.php │ ├── State.php │ ├── Country.php │ ├── Payment.php │ ├── Contract.php │ ├── Comment.php │ ├── Post.php │ └── User.php ├── Http │ ├── Controllers │ │ ├── Controller.php │ │ ├── TwitterController.php │ │ ├── AdminController.php │ │ ├── CommentController.php │ │ ├── ApiController.php │ │ ├── PostController.php │ │ ├── ScraperController.php │ │ ├── PdfController.php │ │ └── UserController.php │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── Authenticate.php │ │ ├── ValidateSignature.php │ │ ├── CheckAuth.php │ │ ├── LanguageManager.php │ │ ├── TrustProxies.php │ │ ├── RedirectIfAuthenticated.php │ │ └── LastSeenUserActivity.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Console │ └── Kernel.php ├── Exports │ └── ContractsExport.php ├── Exceptions │ └── Handler.php └── Jobs │ └── SavePdf.php ├── .gitattributes ├── vite.config.js ├── .gitignore ├── .editorconfig ├── package.json ├── routes ├── channels.php ├── api.php ├── console.php └── web.php ├── config ├── cors.php ├── view.php ├── services.php ├── hashing.php ├── broadcasting.php ├── sanctum.php ├── filesystems.php ├── queue.php ├── cache.php ├── mail.php ├── auth.php ├── logging.php ├── database.php ├── session.php └── app.php ├── phpunit.xml ├── .env.example ├── artisan ├── composer.json └── README.md /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | RewriteRule (.*) /public/ 3 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /resources/views/sendExcel.blade.php: -------------------------------------------------------------------------------- 1 |
Check attachments!
3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | 3 |Your email verified!
12 | @else 13 |Your email is not verified!
14 | Verification mail resend 15 | @endif 16 |Online
6 | @else 7 |Last seen {{ \Carbon\Carbon::parse($post->user->last_seen)->diffForHumans() }}
8 | @endif 9 |{{ $post->text }}
13 || Contract | ||||||||
| subject | 5 |provider | 6 |price | 7 |prepayment | 8 |total payment | 9 |created at | 10 |expire at | 11 |contract number | 12 |status | 13 |
| {{ $contract['subject'] }} | 16 |{{ $contract['provider'] }} | 17 |{{ $contract['price'] }} | 18 |{{ $contract['prepayment'] }} | 19 |{{ $contract['total_payment'] }} | 20 |{{ $contract['created_at'] }} | 21 |{{ $contract['expires_at'] }} | 22 |{{ $contract['contract_number'] }} | 23 |{{ $contract['status'] }} | 24 |
| Payments | ||||||||
| payment number | 32 |billing month | 33 |prepayment | 34 |total | 35 ||||||
| {{ $payment['payment_number'] }} | 38 |{{ $payment['billing_month'] }} | 39 |{{ $payment['prepayment'] }} | 40 |{{ $payment['total'] }} | 41 |
Online
6 | @else 7 |Last seen {{ \Carbon\Carbon::parse($comment->user->last_seen)->diffForHumans()}}
8 | @endif 9 |{{ $comment->text }}
12 |${text.val()}
`) 80 | msg.text('') 81 | btn.text('Edit').toggle() 82 | $(".post-edit-btn").toggle() 83 | $(".post-delete-btn").toggle() 84 | btn.unbind('click') 85 | btn.bind('click', showUpdatePost) 86 | } else { 87 | msg.text(response.error) 88 | } 89 | } 90 | }); 91 | } 92 | function destroyPost () { 93 | let id = $(this).parent().parent().attr('id') 94 | if (confirm("Delete post?")) { 95 | $.ajax({ 96 | url: `/post/${id}`, 97 | type: 'DELETE', 98 | dataType: 'json', 99 | data: { 100 | "_token": $('meta[name="csrf-token"]').attr('content'), 101 | }, 102 | success: function(response){ 103 | if (response.success) { 104 | $(`#${id}`).remove() 105 | } 106 | } 107 | }); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | ## About Laravel 11 | 12 | Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: 13 | 14 | - [Simple, fast routing engine](https://laravel.com/docs/routing). 15 | - [Powerful dependency injection container](https://laravel.com/docs/container). 16 | - Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. 17 | - Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). 18 | - Database agnostic [schema migrations](https://laravel.com/docs/migrations). 19 | - [Robust background job processing](https://laravel.com/docs/queues). 20 | - [Real-time event broadcasting](https://laravel.com/docs/broadcasting). 21 | 22 | Laravel is accessible, powerful, and provides tools required for large, robust applications. 23 | 24 | ## Learning Laravel 25 | 26 | Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. 27 | 28 | You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch. 29 | 30 | If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. 31 | 32 | ## Laravel Sponsors 33 | 34 | We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). 35 | 36 | ### Premium Partners 37 | 38 | - **[Vehikl](https://vehikl.com/)** 39 | - **[Tighten Co.](https://tighten.co)** 40 | - **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** 41 | - **[64 Robots](https://64robots.com)** 42 | - **[Cubet Techno Labs](https://cubettech.com)** 43 | - **[Cyber-Duck](https://cyber-duck.co.uk)** 44 | - **[Many](https://www.many.co.uk)** 45 | - **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** 46 | - **[DevSquad](https://devsquad.com)** 47 | - **[Curotec](https://www.curotec.com/services/technologies/laravel/)** 48 | - **[OP.GG](https://op.gg)** 49 | - **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)** 50 | - **[Lendio](https://lendio.com)** 51 | 52 | ## Contributing 53 | 54 | Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). 55 | 56 | ## Code of Conduct 57 | 58 | In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). 59 | 60 | ## Security Vulnerabilities 61 | 62 | If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. 63 | 64 | ## License 65 | 66 | The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). 67 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", 32 | | "postmark", "log", "array", "failover" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 40 | 'port' => env('MAIL_PORT', 587), 41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 42 | 'username' => env('MAIL_USERNAME'), 43 | 'password' => env('MAIL_PASSWORD'), 44 | 'timeout' => null, 45 | 'local_domain' => env('MAIL_EHLO_DOMAIN'), 46 | ], 47 | 48 | 'ses' => [ 49 | 'transport' => 'ses', 50 | ], 51 | 52 | 'mailgun' => [ 53 | 'transport' => 'mailgun', 54 | // 'client' => [ 55 | // 'timeout' => 5, 56 | // ], 57 | ], 58 | 59 | 'postmark' => [ 60 | 'transport' => 'postmark', 61 | // 'client' => [ 62 | // 'timeout' => 5, 63 | // ], 64 | ], 65 | 66 | 'sendmail' => [ 67 | 'transport' => 'sendmail', 68 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 69 | ], 70 | 71 | 'log' => [ 72 | 'transport' => 'log', 73 | 'channel' => env('MAIL_LOG_CHANNEL'), 74 | ], 75 | 76 | 'array' => [ 77 | 'transport' => 'array', 78 | ], 79 | 80 | 'failover' => [ 81 | 'transport' => 'failover', 82 | 'mailers' => [ 83 | 'smtp', 84 | 'log', 85 | ], 86 | ], 87 | ], 88 | 89 | /* 90 | |-------------------------------------------------------------------------- 91 | | Global "From" Address 92 | |-------------------------------------------------------------------------- 93 | | 94 | | You may wish for all e-mails sent by your application to be sent from 95 | | the same address. Here, you may specify a name and address that is 96 | | used globally for all e-mails that are sent by your application. 97 | | 98 | */ 99 | 100 | 'from' => [ 101 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 102 | 'name' => env('MAIL_FROM_NAME', 'Example'), 103 | ], 104 | 105 | /* 106 | |-------------------------------------------------------------------------- 107 | | Markdown Mail Settings 108 | |-------------------------------------------------------------------------- 109 | | 110 | | If you are using Markdown based email rendering, you may configure your 111 | | theme and component paths here, allowing you to customize the design 112 | | of the emails. Or, you may simply stick with the Laravel defaults! 113 | | 114 | */ 115 | 116 | 'markdown' => [ 117 | 'theme' => 'default', 118 | 119 | 'paths' => [ 120 | resource_path('views/vendor/mail'), 121 | ], 122 | ], 123 | 124 | ]; 125 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | ], 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | User Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | All authentication drivers have a user provider. This defines how the 51 | | users are actually retrieved out of your database or other storage 52 | | mechanisms used by this application to persist your user's data. 53 | | 54 | | If you have multiple user tables or models you may configure multiple 55 | | sources which represent each model / table. These sources may then 56 | | be assigned to any extra authentication guards you have defined. 57 | | 58 | | Supported: "database", "eloquent" 59 | | 60 | */ 61 | 62 | 'providers' => [ 63 | 'users' => [ 64 | 'driver' => 'eloquent', 65 | 'model' => App\Models\User::class, 66 | ], 67 | 68 | // 'users' => [ 69 | // 'driver' => 'database', 70 | // 'table' => 'users', 71 | // ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Resetting Passwords 77 | |-------------------------------------------------------------------------- 78 | | 79 | | You may specify multiple password reset configurations if you have more 80 | | than one user table or model in the application and you want to have 81 | | separate password reset settings based on the specific user types. 82 | | 83 | | The expiry time is the number of minutes that each reset token will be 84 | | considered valid. This security feature keeps tokens short-lived so 85 | | they have less time to be guessed. You may change this as needed. 86 | | 87 | | The throttle setting is the number of seconds a user must wait before 88 | | generating more password reset tokens. This prevents the user from 89 | | quickly generating a very large amount of password reset tokens. 90 | | 91 | */ 92 | 93 | 'passwords' => [ 94 | 'users' => [ 95 | 'provider' => 'users', 96 | 'table' => 'password_reset_tokens', 97 | 'expire' => 60, 98 | 'throttle' => 60, 99 | ], 100 | ], 101 | 102 | /* 103 | |-------------------------------------------------------------------------- 104 | | Password Confirmation Timeout 105 | |-------------------------------------------------------------------------- 106 | | 107 | | Here you may define the amount of seconds before a password confirmation 108 | | times out and the user is prompted to re-enter their password via the 109 | | confirmation screen. By default, the timeout lasts for three hours. 110 | | 111 | */ 112 | 113 | 'password_timeout' => 10800, 114 | 115 | ]; 116 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Deprecations Log Channel 26 | |-------------------------------------------------------------------------- 27 | | 28 | | This option controls the log channel that should be used to log warnings 29 | | regarding deprecated PHP and library features. This allows you to get 30 | | your application ready for upcoming major versions of dependencies. 31 | | 32 | */ 33 | 34 | 'deprecations' => [ 35 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 36 | 'trace' => false, 37 | ], 38 | 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Log Channels 42 | |-------------------------------------------------------------------------- 43 | | 44 | | Here you may configure the log channels for your application. Out of 45 | | the box, Laravel uses the Monolog PHP logging library. This gives 46 | | you a variety of powerful log handlers / formatters to utilize. 47 | | 48 | | Available Drivers: "single", "daily", "slack", "syslog", 49 | | "errorlog", "monolog", 50 | | "custom", "stack" 51 | | 52 | */ 53 | 54 | 'channels' => [ 55 | 'stack' => [ 56 | 'driver' => 'stack', 57 | 'channels' => ['single'], 58 | 'ignore_exceptions' => false, 59 | ], 60 | 61 | 'single' => [ 62 | 'driver' => 'single', 63 | 'path' => storage_path('logs/laravel.log'), 64 | 'level' => env('LOG_LEVEL', 'debug'), 65 | 'replace_placeholders' => true, 66 | ], 67 | 68 | 'daily' => [ 69 | 'driver' => 'daily', 70 | 'path' => storage_path('logs/laravel.log'), 71 | 'level' => env('LOG_LEVEL', 'debug'), 72 | 'days' => 14, 73 | 'replace_placeholders' => true, 74 | ], 75 | 76 | 'slack' => [ 77 | 'driver' => 'slack', 78 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 79 | 'username' => 'Laravel Log', 80 | 'emoji' => ':boom:', 81 | 'level' => env('LOG_LEVEL', 'critical'), 82 | 'replace_placeholders' => true, 83 | ], 84 | 85 | 'papertrail' => [ 86 | 'driver' => 'monolog', 87 | 'level' => env('LOG_LEVEL', 'debug'), 88 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 89 | 'handler_with' => [ 90 | 'host' => env('PAPERTRAIL_URL'), 91 | 'port' => env('PAPERTRAIL_PORT'), 92 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), 93 | ], 94 | 'processors' => [PsrLogMessageProcessor::class], 95 | ], 96 | 97 | 'stderr' => [ 98 | 'driver' => 'monolog', 99 | 'level' => env('LOG_LEVEL', 'debug'), 100 | 'handler' => StreamHandler::class, 101 | 'formatter' => env('LOG_STDERR_FORMATTER'), 102 | 'with' => [ 103 | 'stream' => 'php://stderr', 104 | ], 105 | 'processors' => [PsrLogMessageProcessor::class], 106 | ], 107 | 108 | 'syslog' => [ 109 | 'driver' => 'syslog', 110 | 'level' => env('LOG_LEVEL', 'debug'), 111 | 'facility' => LOG_USER, 112 | 'replace_placeholders' => true, 113 | ], 114 | 115 | 'errorlog' => [ 116 | 'driver' => 'errorlog', 117 | 'level' => env('LOG_LEVEL', 'debug'), 118 | 'replace_placeholders' => true, 119 | ], 120 | 121 | 'null' => [ 122 | 'driver' => 'monolog', 123 | 'handler' => NullHandler::class, 124 | ], 125 | 126 | 'emergency' => [ 127 | 'path' => storage_path('logs/laravel.log'), 128 | ], 129 | ], 130 | 131 | ]; 132 | -------------------------------------------------------------------------------- /public/js/comment.js: -------------------------------------------------------------------------------- 1 | $(".comment-create-btn").click(createComment) 2 | $(".comment-edit-btn").click(showUpdateComment) 3 | $(".comment-delete-btn").click(destroyComment) 4 | $('.comment-reply-btn').click(createReply) 5 | 6 | function createComment () { 7 | let id = $(this).parent().parent().parent().attr('id') 8 | $.ajax({ 9 | url: '/comment/create', 10 | type: 'POST', 11 | dataType: 'json', 12 | data: { 13 | "_token": $('meta[name="csrf-token"]').attr('content'), 14 | text: $(`#${id} .comment-text`).val(), 15 | id: id, 16 | reply: false, 17 | }, 18 | success: function(response){ 19 | if (response.success) { 20 | $(`#${id} .comment-create-msg`).text('Created successfully') 21 | $(`#${id} .comment-text`).val('') 22 | $(`#${id} #comments`).prepend(response.html) 23 | $(`#${id} #comments .comment-edit-btn`).first().bind('click', showUpdateComment) 24 | $(`#${id} #comments .comment-delete-btn`).first().bind('click', destroyComment) 25 | $(`#${id} #comments .comment-reply-btn`).first().bind('click', createReply) 26 | } else { 27 | $(`#${id} .comment-create-msg`).text(response.error) 28 | } 29 | } 30 | }) 31 | } 32 | function showUpdateComment () { 33 | let id = $(this).parent().parent().parent().parent().parent().parent().attr('id') 34 | let commId = $(this).parent().parent().parent().attr('id') 35 | let text = $(`#${id} #${commId} .text:first`) 36 | let btn = $(`#${id} #${commId} .comment-edit-btn`) 37 | btn.text('Save').toggle() 38 | $(".comment-edit-btn").toggle() 39 | $(".comment-delete-btn").toggle() 40 | text.replaceWith(``) 41 | btn.unbind('click') 42 | btn.bind('click', updateComment) 43 | } 44 | function updateComment () { 45 | let id = $(this).parent().parent().parent().parent().parent().parent().attr('id') 46 | let commId = $(this).parent().parent().parent().attr('id') 47 | let text = $(`#${id} #${commId} .text:first`) 48 | let msg = $(`#${id} #${commId} .comment-msg`) 49 | let btn = $(`#${id} #${commId} .comment-edit-btn`) 50 | $.ajax({ 51 | url: `/comment/${commId}`, 52 | type: 'PATCH', 53 | dataType: 'json', 54 | data: { 55 | "_token": $('meta[name="csrf-token"]').attr('content'), 56 | text: text.val(), 57 | }, 58 | success: function(response){ 59 | if (response.success) { 60 | text.replaceWith(`${text.val()}
`) 61 | msg.text('') 62 | btn.text('Edit').toggle() 63 | $(".comment-edit-btn").toggle() 64 | $(".comment-delete-btn").toggle() 65 | btn.unbind('click') 66 | btn.bind('click', showUpdateComment) 67 | } else { 68 | msg.text(response.error) 69 | } 70 | } 71 | }); 72 | } 73 | function destroyComment () { 74 | let id = $(this).parent().parent().parent().parent().parent().parent().attr('id') 75 | let commId = $(this).parent().parent().parent().attr('id') 76 | if (confirm("Delete comment?")) { 77 | $.ajax({ 78 | url: `/comment/${commId}`, 79 | type: 'DELETE', 80 | dataType: 'json', 81 | data: { 82 | "_token": $('meta[name="csrf-token"]').attr('content'), 83 | }, 84 | success: function (response) { 85 | if (response.success) { 86 | $(`#${id} #${commId}`).remove() 87 | } 88 | } 89 | }); 90 | } 91 | } 92 | 93 | function createReply() { 94 | let id = $(this).parent().parent().attr('id') 95 | $.ajax({ 96 | url: '/reply/create', 97 | type: 'POST', 98 | dataType: 'json', 99 | data: { 100 | "_token": $('meta[name="csrf-token"]').attr('content'), 101 | text: $(`#${id} .comment-text`).val(), 102 | id: id, 103 | reply: true, 104 | }, 105 | success: function(response){ 106 | if (response.success) { 107 | $(`#${id} .comment-create-msg`).text('Created successfully') 108 | $(`#${id} .comment-text`).val('') 109 | $(`#${id} #comments`).prepend(response.html) 110 | $(`#${id} #comments .comment-edit-btn`).first().bind('click', showUpdateComment) 111 | $(`#${id} #comments .comment-delete-btn`).first().bind('click', destroyComment) 112 | $(`#${id} #comments .comment-reply-btn`).first().bind('click', createReply) 113 | } else { 114 | $(`#${id} .comment-create-msg`).text(response.error) 115 | } 116 | } 117 | }) 118 | } 119 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Database Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here are each of the database connections setup for your application. 26 | | Of course, examples of configuring each database platform that is 27 | | supported by Laravel is shown below to make development simple. 28 | | 29 | | 30 | | All database work in Laravel is done through the PHP PDO facilities 31 | | so make sure you have the driver for your particular database of 32 | | choice installed on your machine before you begin development. 33 | | 34 | */ 35 | 36 | 'connections' => [ 37 | 38 | 'sqlite' => [ 39 | 'driver' => 'sqlite', 40 | 'url' => env('DATABASE_URL'), 41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 42 | 'prefix' => '', 43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 44 | ], 45 | 46 | 'mysql' => [ 47 | 'driver' => 'mysql', 48 | 'url' => env('DATABASE_URL'), 49 | 'host' => env('DB_HOST', '127.0.0.1'), 50 | 'port' => env('DB_PORT', '3306'), 51 | 'database' => env('DB_DATABASE', 'forge'), 52 | 'username' => env('DB_USERNAME', 'forge'), 53 | 'password' => env('DB_PASSWORD', ''), 54 | 'unix_socket' => env('DB_SOCKET', ''), 55 | 'charset' => 'utf8mb4', 56 | 'collation' => 'utf8mb4_unicode_ci', 57 | 'prefix' => '', 58 | 'prefix_indexes' => true, 59 | 'strict' => true, 60 | 'engine' => null, 61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 63 | ]) : [], 64 | ], 65 | 66 | 'pgsql' => [ 67 | 'driver' => 'pgsql', 68 | 'url' => env('DATABASE_URL'), 69 | 'host' => env('DB_HOST', '127.0.0.1'), 70 | 'port' => env('DB_PORT', '5432'), 71 | 'database' => env('DB_DATABASE', 'forge'), 72 | 'username' => env('DB_USERNAME', 'forge'), 73 | 'password' => env('DB_PASSWORD', ''), 74 | 'charset' => 'utf8', 75 | 'prefix' => '', 76 | 'prefix_indexes' => true, 77 | 'search_path' => 'public', 78 | 'sslmode' => 'prefer', 79 | ], 80 | 81 | 'sqlsrv' => [ 82 | 'driver' => 'sqlsrv', 83 | 'url' => env('DATABASE_URL'), 84 | 'host' => env('DB_HOST', 'localhost'), 85 | 'port' => env('DB_PORT', '1433'), 86 | 'database' => env('DB_DATABASE', 'forge'), 87 | 'username' => env('DB_USERNAME', 'forge'), 88 | 'password' => env('DB_PASSWORD', ''), 89 | 'charset' => 'utf8', 90 | 'prefix' => '', 91 | 'prefix_indexes' => true, 92 | // 'encrypt' => env('DB_ENCRYPT', 'yes'), 93 | // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), 94 | ], 95 | 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Migration Repository Table 101 | |-------------------------------------------------------------------------- 102 | | 103 | | This table keeps track of all the migrations that have already run for 104 | | your application. Using this information, we can determine which of 105 | | the migrations on disk haven't actually been run in the database. 106 | | 107 | */ 108 | 109 | 'migrations' => 'migrations', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Redis Databases 114 | |-------------------------------------------------------------------------- 115 | | 116 | | Redis is an open source, fast, and advanced key-value store that also 117 | | provides a richer body of commands than a typical key-value system 118 | | such as APC or Memcached. Laravel makes it easy to dig right in. 119 | | 120 | */ 121 | 122 | 'redis' => [ 123 | 124 | 'client' => env('REDIS_CLIENT', 'phpredis'), 125 | 126 | 'options' => [ 127 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 128 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 129 | ], 130 | 131 | 'default' => [ 132 | 'url' => env('REDIS_URL'), 133 | 'host' => env('REDIS_HOST', '127.0.0.1'), 134 | 'username' => env('REDIS_USERNAME'), 135 | 'password' => env('REDIS_PASSWORD'), 136 | 'port' => env('REDIS_PORT', '6379'), 137 | 'database' => env('REDIS_DB', '0'), 138 | ], 139 | 140 | 'cache' => [ 141 | 'url' => env('REDIS_URL'), 142 | 'host' => env('REDIS_HOST', '127.0.0.1'), 143 | 'username' => env('REDIS_USERNAME'), 144 | 'password' => env('REDIS_PASSWORD'), 145 | 'port' => env('REDIS_PORT', '6379'), 146 | 'database' => env('REDIS_CACHE_DB', '1'), 147 | ], 148 | 149 | ], 150 | 151 | ]; 152 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Session Lifetime 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may specify the number of minutes that you wish the session 29 | | to be allowed to remain idle before it expires. If you want them 30 | | to immediately expire on the browser closing, set that option. 31 | | 32 | */ 33 | 34 | 'lifetime' => env('SESSION_LIFETIME', 120), 35 | 36 | 'expire_on_close' => false, 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Session Encryption 41 | |-------------------------------------------------------------------------- 42 | | 43 | | This option allows you to easily specify that all of your session data 44 | | should be encrypted before it is stored. All encryption will be run 45 | | automatically by Laravel and you can use the Session like normal. 46 | | 47 | */ 48 | 49 | 'encrypt' => false, 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Session File Location 54 | |-------------------------------------------------------------------------- 55 | | 56 | | When using the native session driver, we need a location where session 57 | | files may be stored. A default has been set for you but a different 58 | | location may be specified. This is only needed for file sessions. 59 | | 60 | */ 61 | 62 | 'files' => storage_path('framework/sessions'), 63 | 64 | /* 65 | |-------------------------------------------------------------------------- 66 | | Session Database Connection 67 | |-------------------------------------------------------------------------- 68 | | 69 | | When using the "database" or "redis" session drivers, you may specify a 70 | | connection that should be used to manage these sessions. This should 71 | | correspond to a connection in your database configuration options. 72 | | 73 | */ 74 | 75 | 'connection' => env('SESSION_CONNECTION'), 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Session Database Table 80 | |-------------------------------------------------------------------------- 81 | | 82 | | When using the "database" session driver, you may specify the table we 83 | | should use to manage the sessions. Of course, a sensible default is 84 | | provided for you; however, you are free to change this as needed. 85 | | 86 | */ 87 | 88 | 'table' => 'sessions', 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Session Cache Store 93 | |-------------------------------------------------------------------------- 94 | | 95 | | While using one of the framework's cache driven session backends you may 96 | | list a cache store that should be used for these sessions. This value 97 | | must match with one of the application's configured cache "stores". 98 | | 99 | | Affects: "apc", "dynamodb", "memcached", "redis" 100 | | 101 | */ 102 | 103 | 'store' => env('SESSION_STORE'), 104 | 105 | /* 106 | |-------------------------------------------------------------------------- 107 | | Session Sweeping Lottery 108 | |-------------------------------------------------------------------------- 109 | | 110 | | Some session drivers must manually sweep their storage location to get 111 | | rid of old sessions from storage. Here are the chances that it will 112 | | happen on a given request. By default, the odds are 2 out of 100. 113 | | 114 | */ 115 | 116 | 'lottery' => [2, 100], 117 | 118 | /* 119 | |-------------------------------------------------------------------------- 120 | | Session Cookie Name 121 | |-------------------------------------------------------------------------- 122 | | 123 | | Here you may change the name of the cookie used to identify a session 124 | | instance by ID. The name specified here will get used every time a 125 | | new session cookie is created by the framework for every driver. 126 | | 127 | */ 128 | 129 | 'cookie' => env( 130 | 'SESSION_COOKIE', 131 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session' 132 | ), 133 | 134 | /* 135 | |-------------------------------------------------------------------------- 136 | | Session Cookie Path 137 | |-------------------------------------------------------------------------- 138 | | 139 | | The session cookie path determines the path for which the cookie will 140 | | be regarded as available. Typically, this will be the root path of 141 | | your application but you are free to change this when necessary. 142 | | 143 | */ 144 | 145 | 'path' => '/', 146 | 147 | /* 148 | |-------------------------------------------------------------------------- 149 | | Session Cookie Domain 150 | |-------------------------------------------------------------------------- 151 | | 152 | | Here you may change the domain of the cookie used to identify a session 153 | | in your application. This will determine which domains the cookie is 154 | | available to in your application. A sensible default has been set. 155 | | 156 | */ 157 | 158 | 'domain' => env('SESSION_DOMAIN'), 159 | 160 | /* 161 | |-------------------------------------------------------------------------- 162 | | HTTPS Only Cookies 163 | |-------------------------------------------------------------------------- 164 | | 165 | | By setting this option to true, session cookies will only be sent back 166 | | to the server if the browser has a HTTPS connection. This will keep 167 | | the cookie from being sent to you when it can't be done securely. 168 | | 169 | */ 170 | 171 | 'secure' => env('SESSION_SECURE_COOKIE'), 172 | 173 | /* 174 | |-------------------------------------------------------------------------- 175 | | HTTP Access Only 176 | |-------------------------------------------------------------------------- 177 | | 178 | | Setting this value to true will prevent JavaScript from accessing the 179 | | value of the cookie and the cookie will only be accessible through 180 | | the HTTP protocol. You are free to modify this option if needed. 181 | | 182 | */ 183 | 184 | 'http_only' => true, 185 | 186 | /* 187 | |-------------------------------------------------------------------------- 188 | | Same-Site Cookies 189 | |-------------------------------------------------------------------------- 190 | | 191 | | This option determines how your cookies behave when cross-site requests 192 | | take place, and can be used to mitigate CSRF attacks. By default, we 193 | | will set this value to "lax" since this is a secure default value. 194 | | 195 | | Supported: "lax", "strict", "none", null 196 | | 197 | */ 198 | 199 | 'same_site' => 'lax', 200 | 201 | ]; 202 | -------------------------------------------------------------------------------- /app/Http/Controllers/UserController.php: -------------------------------------------------------------------------------- 1 | $countries, 'error' => '']); 31 | } 32 | public function getStates (Request $request) 33 | { 34 | $states = State::where('country_id', '=', $request->country_id)->get(['name','id']); 35 | return response()->json(['success' => true, 'states' => $states]); 36 | } 37 | public function getCities (Request $request) 38 | { 39 | $cities = City::where('state_id', '=', $request->state_id)->get(['name','id']); 40 | return response()->json(['success' => true, 'cities' => $cities]); 41 | } 42 | public function register (Request $request) 43 | { 44 | $credentials = $request->only('email', 'password', 'password_confirmation'); 45 | $validator = Validator::make($credentials, [ 46 | 'email' => 'required|email|unique:users,email', 47 | 'password' => 'required|confirmed|min:6', 48 | 'password_confirmation' => 'required', 49 | ]); 50 | if ($validator->stopOnFirstFailure()->fails()) { 51 | $response = ['success' => false, 'error' => $validator->errors()->first(), 'countries' => Country::get(['name','id'])]; 52 | return view('register', $response); 53 | } 54 | $user = User::create([ 55 | 'email' => $request->email, 56 | 'password' => Hash::make($request->password), 57 | 'country' => null, 58 | 'state' => null, 59 | 'city' => null 60 | ]); 61 | if (Country::where('id', $request->country)->first()) { 62 | User::where('email', $request->email)->update([ 63 | 'country' => Country::where('id', $request->country)->first()->name, 64 | ]); 65 | } 66 | if (State::where('id', $request->state)->first()) { 67 | User::where('email', $request->email)->update([ 68 | 'state' => State::where('id', $request->state)->first()->name, 69 | ]); 70 | } 71 | if (City::where('id', $request->city)->first()) { 72 | User::where('email', $request->email)->update([ 73 | 'city' => city::where('id', $request->city)->first()->name, 74 | ]); 75 | } 76 | event(new Registered($user)); 77 | if (!Auth::attempt($request->only('email', 'password'))) { 78 | $response = ['success' => false, 'error' => 'Invalid email or username', 'countries' => Country::get(['name','id'])]; 79 | return view('register', $response); 80 | } 81 | return redirect('home'); 82 | } 83 | public function login (Request $request) 84 | { 85 | $validator = Validator::make($request->only(['email', 'password']), [ 86 | 'email' => 'required|email', 87 | 'password' => 'required|alpha_num', 88 | ]); 89 | if ($validator->stopOnFirstFailure()->fails()) { 90 | $response = ['success' => false, 'error' => $validator->errors()->first()]; 91 | return view('login', $response); 92 | } 93 | 94 | if (!Auth::attempt($request->only('email', 'password'))) { 95 | $response = ['success' => false, 'error' => 'Invalid email or username']; 96 | return view('login', $response); 97 | } 98 | return redirect('home'); 99 | } 100 | public function changeLang (Request $request) 101 | { 102 | App::setLocale($request->lang); 103 | session()->put('locale', $request->lang); 104 | return response()->json(["success" => true, "lang" => $request->lang]); 105 | } 106 | private array $data = Array(); 107 | private int $count = 0; 108 | public function parseXML () 109 | { 110 | $allFiles = Storage::disk('public')->allFiles('xml'); 111 | foreach ($allFiles as $xmlFileLink) { 112 | $this->data = []; 113 | $xmlFile = Storage::disk('public')->get($xmlFileLink); 114 | $xml = simplexml_load_string($xmlFile); 115 | $json = json_encode($xml); 116 | $array = json_decode($json,TRUE); 117 | $this->parseData($array); 118 | $parsedData = $this->data; 119 | $contract = $this->createCotract($parsedData); 120 | Excel::store( 121 | new ContractsExport($contract), 122 | 'xlsx/contract_'.$contract['id'].'.xlsx', 123 | 'public' 124 | ); 125 | } 126 | $contracts = Contract::all()->toArray(); 127 | Mail::send("sendExcel", $contracts, function ($message) use ($contracts) { 128 | $message->from("Sashka@mail.com", "Sashka"); 129 | $message->to("Sashka@mail.com"); 130 | foreach ($contracts as $contract) { 131 | $message->attach(public_path("storage/xlsx/contract_".$contract["id"].".xlsx")); 132 | } 133 | }); 134 | } 135 | 136 | public function parseData ($array) 137 | { 138 | foreach ($array as $key => $value) { 139 | if ($key == "ПериодДействия") { 140 | $test = explode(" ", $value); 141 | $this->data['created_at'] = $test[1]; 142 | $this->data['expires_at'] = $test[3]; 143 | } elseif (gettype($value) !== 'array') { 144 | $this->data[$key] = $value; 145 | } elseif ($key == "Платежи") { 146 | $this->parsePayments($value); 147 | } else { 148 | $this->parseData($value); 149 | } 150 | } 151 | } 152 | public function parsePayments ($array) 153 | { 154 | foreach ($array as $key => $value) { 155 | if (gettype($value) !== 'array') { 156 | $this->data['Платежи'][$this->count][$key] = $value; 157 | } else { 158 | $this->parsePayments($value); 159 | } 160 | } 161 | if (count($array) > 1) { 162 | $this->count++; 163 | } 164 | } 165 | public function createCotract ($parsedData) 166 | { 167 | $contract = Contract::create([ 168 | "subject" => $parsedData["ПредметДоговора"], 169 | "provider" => $parsedData["Поставщик"], 170 | "price" => $parsedData["КонтрактнаяСтоимость"], 171 | "prepayment" => $parsedData["СуммаАвансовогоПлатежа"], 172 | "total_payment" => $parsedData["ОбщаяСуммаПлатежа"], 173 | "created_at" => Carbon::createFromFormat("d.m.Y", $parsedData["created_at"], "Europe/Kiev") 174 | ->toDateTimeString(), 175 | "expires_at" => Carbon::createFromFormat("d.m.Y", $parsedData["expires_at"], "Europe/Kiev") 176 | ->toDateTimeString(), 177 | "contract_number" => $parsedData["НомерДоговора"], 178 | "status" => $parsedData["СтатусДоговора"], 179 | ]); 180 | foreach ($parsedData["Платежи"] as $value) { 181 | Payment::create([ 182 | "contract_id" => $contract->id, 183 | "payment_number" => $value["НомерПлатежа"], 184 | "billing_month" => $value["РасчетныйМесяц"], 185 | "prepayment" => $value["СуммаАвансовогоПлатежа"], 186 | "total" => $value["ИтогоКОплатеСНДС"], 187 | ]); 188 | } 189 | return Contract::find($contract->id)->toArray(); 190 | } 191 | } 192 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Laravel'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Application Environment 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This value determines the "environment" your application is currently 26 | | running in. This may determine how you prefer to configure various 27 | | services the application utilizes. Set this in your ".env" file. 28 | | 29 | */ 30 | 31 | 'env' => env('APP_ENV', 'production'), 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Application Debug Mode 36 | |-------------------------------------------------------------------------- 37 | | 38 | | When your application is in debug mode, detailed error messages with 39 | | stack traces will be shown on every error that occurs within your 40 | | application. If disabled, a simple generic error page is shown. 41 | | 42 | */ 43 | 44 | 'debug' => (bool) env('APP_DEBUG', false), 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Application URL 49 | |-------------------------------------------------------------------------- 50 | | 51 | | This URL is used by the console to properly generate URLs when using 52 | | the Artisan command line tool. You should set this to the root of 53 | | your application so that it is used when running Artisan tasks. 54 | | 55 | */ 56 | 57 | 'url' => env('APP_URL', 'http://localhost'), 58 | 59 | 'asset_url' => env('ASSET_URL'), 60 | 61 | /* 62 | |-------------------------------------------------------------------------- 63 | | Application Timezone 64 | |-------------------------------------------------------------------------- 65 | | 66 | | Here you may specify the default timezone for your application, which 67 | | will be used by the PHP date and date-time functions. We have gone 68 | | ahead and set this to a sensible default for you out of the box. 69 | | 70 | */ 71 | 72 | 'timezone' => 'Europe/Kiev', 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Application Locale Configuration 77 | |-------------------------------------------------------------------------- 78 | | 79 | | The application locale determines the default locale that will be used 80 | | by the translation service provider. You are free to set this value 81 | | to any of the locales which will be supported by the application. 82 | | 83 | */ 84 | 85 | 'locale' => 'en', 86 | 87 | /* 88 | |-------------------------------------------------------------------------- 89 | | Application Fallback Locale 90 | |-------------------------------------------------------------------------- 91 | | 92 | | The fallback locale determines the locale to use when the current one 93 | | is not available. You may change the value to correspond to any of 94 | | the language folders that are provided through your application. 95 | | 96 | */ 97 | 98 | 'fallback_locale' => 'en', 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Faker Locale 103 | |-------------------------------------------------------------------------- 104 | | 105 | | This locale will be used by the Faker PHP library when generating fake 106 | | data for your database seeds. For example, this will be used to get 107 | | localized telephone numbers, street address information and more. 108 | | 109 | */ 110 | 111 | 'faker_locale' => 'en_US', 112 | 113 | /* 114 | |-------------------------------------------------------------------------- 115 | | Encryption Key 116 | |-------------------------------------------------------------------------- 117 | | 118 | | This key is used by the Illuminate encrypter service and should be set 119 | | to a random, 32 character string, otherwise these encrypted strings 120 | | will not be safe. Please do this before deploying an application! 121 | | 122 | */ 123 | 124 | 'key' => env('APP_KEY'), 125 | 126 | 'cipher' => 'AES-256-CBC', 127 | 128 | /* 129 | |-------------------------------------------------------------------------- 130 | | Maintenance Mode Driver 131 | |-------------------------------------------------------------------------- 132 | | 133 | | These configuration options determine the driver used to determine and 134 | | manage Laravel's "maintenance mode" status. The "cache" driver will 135 | | allow maintenance mode to be controlled across multiple machines. 136 | | 137 | | Supported drivers: "file", "cache" 138 | | 139 | */ 140 | 141 | 'maintenance' => [ 142 | 'driver' => 'file', 143 | // 'store' => 'redis', 144 | ], 145 | 146 | /* 147 | |-------------------------------------------------------------------------- 148 | | Autoloaded Service Providers 149 | |-------------------------------------------------------------------------- 150 | | 151 | | The service providers listed here will be automatically loaded on the 152 | | request to your application. Feel free to add your own services to 153 | | this array to grant expanded functionality to your applications. 154 | | 155 | */ 156 | 157 | 'providers' => [ 158 | 159 | /* 160 | * Laravel Framework Service Providers... 161 | */ 162 | Illuminate\Auth\AuthServiceProvider::class, 163 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 164 | Illuminate\Bus\BusServiceProvider::class, 165 | Illuminate\Cache\CacheServiceProvider::class, 166 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 167 | Illuminate\Cookie\CookieServiceProvider::class, 168 | Illuminate\Database\DatabaseServiceProvider::class, 169 | Illuminate\Encryption\EncryptionServiceProvider::class, 170 | Illuminate\Filesystem\FilesystemServiceProvider::class, 171 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 172 | Illuminate\Hashing\HashServiceProvider::class, 173 | Illuminate\Mail\MailServiceProvider::class, 174 | Illuminate\Notifications\NotificationServiceProvider::class, 175 | Illuminate\Pagination\PaginationServiceProvider::class, 176 | Illuminate\Pipeline\PipelineServiceProvider::class, 177 | Illuminate\Queue\QueueServiceProvider::class, 178 | Illuminate\Redis\RedisServiceProvider::class, 179 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 180 | Illuminate\Session\SessionServiceProvider::class, 181 | Illuminate\Translation\TranslationServiceProvider::class, 182 | Illuminate\Validation\ValidationServiceProvider::class, 183 | Illuminate\View\ViewServiceProvider::class, 184 | Maatwebsite\Excel\ExcelServiceProvider::class, 185 | Laravel\Socialite\SocialiteServiceProvider::class, 186 | 187 | /* 188 | * Package Service Providers... 189 | */ 190 | Weidner\Goutte\GoutteServiceProvider::class, 191 | 192 | /* 193 | * Application Service Providers... 194 | */ 195 | App\Providers\AppServiceProvider::class, 196 | App\Providers\AuthServiceProvider::class, 197 | // App\Providers\BroadcastServiceProvider::class, 198 | App\Providers\EventServiceProvider::class, 199 | App\Providers\RouteServiceProvider::class, 200 | 201 | ], 202 | 203 | /* 204 | |-------------------------------------------------------------------------- 205 | | Class Aliases 206 | |-------------------------------------------------------------------------- 207 | | 208 | | This array of class aliases will be registered when this application 209 | | is started. However, feel free to register as many as you wish as 210 | | the aliases are "lazy" loaded so they don't hinder performance. 211 | | 212 | */ 213 | 214 | 'aliases' => Facade::defaultAliases()->merge([ 215 | // 'ExampleClass' => App\Example\ExampleClass::class, 216 | 'Goutte' => Weidner\Goutte\GoutteFacade::class, 217 | 'Excel' => Maatwebsite\Excel\Facades\Excel::class, 218 | 'Socialite' => Laravel\Socialite\Facades\Socialite::class, 219 | ])->toArray(), 220 | 221 | ]; 222 | --------------------------------------------------------------------------------
{{ __('messages.create_comment_title') }}
23 | 24 | 25 | 26 |