├── public ├── favicon.ico ├── robots.txt ├── .htaccess └── index.php ├── database ├── .gitignore ├── seeders │ └── DatabaseSeeder.php ├── migrations │ └── 2014_10_12_000000_create_users_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 ├── README.md ├── app ├── Http │ ├── Controllers │ │ ├── UserController.php │ │ ├── ChannelController.php │ │ ├── Controller.php │ │ ├── SpamfilterController.php │ │ ├── IndexController.php │ │ ├── LanguageController.php │ │ ├── DashboardController.php │ │ ├── Auth │ │ │ └── LoginController.php │ │ └── BanController.php │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── TrustHosts.php │ │ ├── TrimStrings.php │ │ ├── Authenticate.php │ │ ├── Localization.php │ │ ├── TrustProxies.php │ │ ├── RedirectIfAuthenticated.php │ │ └── HandleInertiaRequests.php │ ├── Requests │ │ └── LoginRequest.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── UnrealIRCd.php ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Rules │ └── Irc.php └── Models │ └── User.php ├── .gitattributes ├── jsconfig.json ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── CreatesApplication.php └── Feature │ ├── Auth │ └── AuthenticationTest.php │ └── DashboardTest.php ├── .styleci.yml ├── .run ├── phpunit.xml.run.xml ├── dev.run.xml └── build.run.xml ├── .gitignore ├── .editorconfig ├── resources ├── css │ └── app.scss ├── views │ └── app.blade.php └── js │ ├── app.js │ ├── bootstrap.js │ ├── Pagelets │ ├── Channels.vue │ ├── Bans.vue │ └── Users.vue │ ├── Pages │ ├── Dashboard.vue │ ├── Bans.vue │ └── Auth │ │ └── Login.vue │ ├── Components │ └── Ban.vue │ └── Layouts │ └── Authenticated.vue ├── routes ├── auth.php ├── channels.php ├── api.php ├── console.php └── web.php ├── lang ├── en │ ├── pagination.php │ ├── auth.php │ ├── passwords.php │ └── validation.php ├── es │ ├── pagination.php │ ├── auth.php │ ├── passwords.php │ └── validation.php ├── tr │ ├── pagination.php │ ├── passwords.php │ ├── auth.php │ └── validation.php ├── en.json ├── tr.json └── es.json ├── package.json ├── config ├── cors.php ├── services.php ├── unrealircd.php ├── view.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 └── ide-helper.php ├── phpunit.xml ├── OLD_README.md ├── .env.example ├── vite.config.js ├── artisan └── composer.json /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This was the old and unfinished attempt at an UnrealIRCd admin panel. 2 | 3 | The new admin panel is located at https://github.com/unrealircd/unrealircd-webpanel 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/Http/Controllers/UserController.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/build 3 | /public/hot 4 | /public/storage 5 | /storage/*.key 6 | /vendor 7 | .env 8 | .env.backup 9 | .phpunit.result.cache 10 | Homestead.json 11 | Homestead.yaml 12 | npm-debug.log 13 | yarn-error.log 14 | /.idea 15 | /.vscode 16 | .error.log 17 | .phpstorm.meta.php 18 | _ide_helper.php 19 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /resources/css/app.scss: -------------------------------------------------------------------------------- 1 | @import "bootstrap/dist/css/bootstrap.min.css"; 2 | 3 | @import 'bootstrap-vue-3/dist/bootstrap-vue-3.css'; 4 | 5 | html, body, #app { 6 | height: 100vh; 7 | } 8 | 9 | .topper { 10 | z-index: 10000000; 11 | } 12 | 13 | button#lang-dropdown.btn.btn-secondary { 14 | padding: 0; 15 | margin: 0; 16 | background: none; 17 | border: none; 18 | color: #0d6efd; 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | @routes 12 | @vite('resources/css/app.scss') 13 | @vite('resources/js/app.js') 14 | @inertiaHead 15 | 16 | 17 | @inertia 18 | 19 | 20 | -------------------------------------------------------------------------------- /lang/tr/pagination.php: -------------------------------------------------------------------------------- 1 | '« Önceki', 25 | 'next' => 'Sonraki »', 26 | 27 | ]; 28 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 19 | } 20 | 21 | /** 22 | * Register the commands for the application. 23 | * 24 | * @return void 25 | */ 26 | protected function commands() 27 | { 28 | $this->load(__DIR__.'/Commands'); 29 | 30 | require base_path('routes/console.php'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('username')->unique(); 19 | $table->string('password'); 20 | $table->rememberToken(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('users'); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class UserFactory extends Factory 13 | { 14 | /** 15 | * Define the model's default state. 16 | * 17 | * @return array 18 | */ 19 | #[ArrayShape(['username' => "string", 'password' => "string", 'remember_token' => "string"])] 20 | public function definition(): array 21 | { 22 | return [ 23 | 'username' => str_replace(".", "_", fake()->userName()), 24 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 25 | 'remember_token' => Str::random(10), 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/LoginRequest.php: -------------------------------------------------------------------------------- 1 | check()) { 19 | return true; 20 | } 21 | 22 | return false; 23 | } 24 | 25 | /** 26 | * Get the validation rules that apply to the request. 27 | * 28 | * @return array 29 | */ 30 | public function rules(): array 31 | { 32 | return [ 33 | 'username' => ['required'], 34 | 'password' => ['required'] 35 | ]; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lang/es/passwords.php: -------------------------------------------------------------------------------- 1 | '¡Tu contraseña ha sido restablecida!', 17 | 'sent' => '¡Le hemos enviado un correo electrónico con su enlace de restablecimiento de contraseña!', 18 | 'throttled' => 'Espere antes de volver a intentarlo.', 19 | 'token' => 'Este token de restablecimiento de contraseña no es válido.', 20 | 'user' => "No podemos encontrar un usuario con esa dirección de correo electrónico.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /lang/tr/passwords.php: -------------------------------------------------------------------------------- 1 | 'Şifreniz sıfırlandı!', 24 | 'sent' => 'Şifre sıfırlama bağlantınızı e-postayla gönderildi!', 25 | 'throttled' => 'Lütfen yeniden denemeden önce bekleyin.', 26 | 'token' => 'Bu parola sıfırlama belirteci geçersiz.', 27 | 'user' => "Bu e-posta adresine sahip bir kullanıcı bulamıyoruz.", 28 | 29 | ]; 30 | -------------------------------------------------------------------------------- /app/Http/Controllers/LanguageController.php: -------------------------------------------------------------------------------- 1 | put('_lang', $language); 13 | 14 | app()->setLocale($language); 15 | session()->flash('message', [ 16 | 'type' => 'success', 17 | 'title' => __('Success!'), 18 | 'message' => __("Your language has been updated.") 19 | ]); 20 | 21 | return redirect()->back(); 22 | } 23 | 24 | session()->flash('message', [ 25 | 'type' => 'danger', 26 | 'title' => __('Error'), 27 | 'message' => __("That language is not supported.") 28 | ]); 29 | 30 | return redirect()->back(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /lang/tr/auth.php: -------------------------------------------------------------------------------- 1 | 'Bu kimlik bilgileri kayıtlarımızla eşleşmiyor.', 26 | 'password' => 'Girilen şifre yanlış.', 27 | 'throttle' => 'Çok fazla giriş denemesi. Lütfen :seconds saniye sonra tekrar deneyin.', 28 | 29 | ]; 30 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | 'scheme' => 'https', 22 | ], 23 | 24 | 'postmark' => [ 25 | 'token' => env('POSTMARK_TOKEN'), 26 | ], 27 | 28 | 'ses' => [ 29 | 'key' => env('AWS_ACCESS_KEY_ID'), 30 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 31 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 32 | ], 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/unrealircd.php: -------------------------------------------------------------------------------- 1 | [ 9 | 10 | /* 11 | | The socket is only available on the machine UnrealIRCd is running on. 12 | | 13 | | See also: @todo link to reverse proxy??? 14 | */ 15 | 16 | 'socket' => env('UNREAL_RPC_SERVER_SOCKET', 'unix:///home/xyz/unrealircd/data/rpc.sock'), 17 | 18 | 'host' => env('UNREAL_RPC_SERVER_ADDRESS', '192.168.0.3'), 19 | 'port' => env('UNREAL_RPC_SERVER_PORT', 6969), 20 | ], 21 | 22 | 'rpc' => [ 23 | 24 | /* 25 | | The method that we will use to connect to the RPC service. 26 | | 27 | | Supported drivers: "http", "wockets" 28 | */ 29 | 30 | 'method' => env('UNREAL_RPC_METHOD', 'websockets'), 31 | ], 32 | 33 | /* 34 | | Should we check that an SSL/TLS Certificate is valid? 35 | | 36 | | It is *strongly* recommended you leave this as true. 37 | */ 38 | 'tls_verify' => env('UNREAL_TLS_VERIFY', true), 39 | 40 | ]; 41 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | > 16 | */ 17 | protected $listen = [ 18 | Registered::class => [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | // 31 | } 32 | 33 | /** 34 | * Determine if events and listeners should be automatically discovered. 35 | * 36 | * @return bool 37 | */ 38 | public function shouldDiscoverEvents() 39 | { 40 | return false; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /tests/Feature/Auth/AuthenticationTest.php: -------------------------------------------------------------------------------- 1 | get('/login'); 17 | 18 | $response->assertStatus(200); 19 | } 20 | 21 | public function test_users_can_authenticate_using_the_login_screen() 22 | { 23 | $response = $this->post(route('login'), [ 24 | 'username' => 'apiuser', 25 | 'password' => 'password', 26 | ]); 27 | 28 | $this->assertAuthenticated(); 29 | $response->assertRedirect(RouteServiceProvider::HOME); 30 | } 31 | 32 | public function test_users_can_not_authenticate_with_invalid_password() 33 | { 34 | $user = User::factory()->create(); 35 | 36 | $this->post('/login', [ 37 | 'username' => $user->username, 38 | 'password' => 'wrong-password', 39 | ]); 40 | 41 | $this->assertGuest(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | import { createApp, h } from 'vue'; 3 | import { createInertiaApp, Head, Link } from '@inertiajs/inertia-vue3'; 4 | import { InertiaProgress } from '@inertiajs/progress'; 5 | import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'; 6 | import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m'; 7 | import '@popperjs/core'; 8 | import 'bootstrap/dist/js/bootstrap.min.js'; 9 | import { BootstrapVue3 } from "bootstrap-vue-3"; 10 | import { BToastPlugin } from "bootstrap-vue-3"; 11 | 12 | const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel'; 13 | 14 | createInertiaApp({ 15 | title: (title) => `${title} - ${appName}`, 16 | resolve: (name) => resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob('./Pages/**/*.vue')), 17 | setup({ el, app, props, plugin }) { 18 | return createApp({ render: () => h(app, props) }) 19 | .use(plugin) 20 | .use(BootstrapVue3) 21 | .use(BToastPlugin) 22 | .use(ZiggyVue, Ziggy) 23 | .component('XHead', Head) 24 | .component('XLink', Link) 25 | .mount(el); 26 | }, 27 | }).then(() => {}); 28 | 29 | InertiaProgress.init({ color: '#3399ff' }); 30 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | , \Psr\Log\LogLevel::*> 14 | */ 15 | protected $levels = [ 16 | // 17 | ]; 18 | 19 | /** 20 | * A list of the exception types that are not reported. 21 | * 22 | * @var array> 23 | */ 24 | protected $dontReport = [ 25 | // 26 | ]; 27 | 28 | /** 29 | * A list of the inputs that are never flashed to the session on validation exceptions. 30 | * 31 | * @var array 32 | */ 33 | protected $dontFlash = [ 34 | 'current_password', 35 | 'password', 36 | 'password_confirmation', 37 | ]; 38 | 39 | /** 40 | * Register the exception handling callbacks for the application. 41 | * 42 | * @return void 43 | */ 44 | public function register() 45 | { 46 | $this->reportable(function (Throwable $e) { 47 | // 48 | }); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/Rules/Irc.php: -------------------------------------------------------------------------------- 1 | 0) { 34 | return true; 35 | } 36 | 37 | return false; 38 | } 39 | 40 | /** 41 | * Get the validation error message. 42 | * 43 | * @return string 44 | */ 45 | public function message(): string 46 | { 47 | return 'Illegal characters.'; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import axios from 'axios'; 3 | 4 | window.__ = (key, replace) => { 5 | let translation = JSON.parse(window.Unreal).translations[key] ? JSON.parse(window.Unreal).translations[key] : key; 6 | 7 | _.forEach(replace, (value, key) => { 8 | translation = translation.replace(':'+key, value); 9 | }); 10 | 11 | return translation; 12 | }; 13 | 14 | window.axios = axios; 15 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 16 | 17 | /** 18 | * Echo exposes an expressive API for subscribing to channels and listening 19 | * for events that are broadcast by Laravel. Echo and event broadcasting 20 | * allows your team to easily build robust real-time web applications. 21 | */ 22 | 23 | // import Echo from 'laravel-echo'; 24 | 25 | // import Pusher from 'pusher-js'; 26 | // window.Pusher = Pusher; 27 | 28 | // window.Echo = new Echo({ 29 | // broadcaster: 'pusher', 30 | // key: import.meta.env.VITE_PUSHER_APP_KEY, 31 | // wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_CLUSTER}.pusher.com`, 32 | // wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, 33 | // wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, 34 | // forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', 35 | // enabledTransports: ['ws', 'wss'], 36 | // }); 37 | -------------------------------------------------------------------------------- /OLD_README.md: -------------------------------------------------------------------------------- 1 | (No longer maintained) 2 | 3 | ## Getting Started 4 | 5 | Ensure you have PHP and NodeJS installed on your system or that the PHP and NodeJS binaries are in your system path. 6 | 7 | ```sh 8 | git clone .... 9 | cd unrealircd-webpanel 10 | ``` 11 | 12 | Then install the project dependancies 13 | ```sh 14 | composer install && npm install 15 | ``` 16 | You'll need to make sure you're running composer version 2 or higher. 17 | 18 | If you are making any changes to the front-end code (located in `resources/js`), you'll need to also run 19 | ```sh 20 | npm run dev 21 | ``` 22 | 23 | This will run the Vite dev server and changes will be reflected immediately in the browser. 24 | ## Configuring 25 | There are two configuration files you'll need to configure to match your setup. 26 | * [config/database.php](config/database.php) - The configuration about your database (sqlite, mysqli, postrgesql) 27 | * [config/unrealircd.php](config/unrealircd.php) - The configuration about your UnrealIRCd instance. 28 | 29 | Outside of this, you will need to create an `rpc-user {}` block as well as a `listen {}` block in your UnrealIRCd. 30 | For more information on configuring your UnrealIRCd for RPC, [check this link](https://www.unrealircd.org/docs/JSON-RPC) 31 | 32 | ## Running 33 | To run the webpanel: 34 | ```sh 35 | php artisan serve 36 | ``` 37 | then point your browser at `http://localhost:8000` 38 | 39 | ## Documentation 40 | to do... 41 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME="UnrealIRCd Admin Panel" 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_DEPRECATIONS_CHANNEL=null 9 | LOG_LEVEL=debug 10 | 11 | DB_CONNECTION=sqlite 12 | DB_URL=database/database.sqlite 13 | 14 | BROADCAST_DRIVER=log 15 | CACHE_DRIVER=file 16 | FILESYSTEM_DISK=local 17 | QUEUE_CONNECTION=sync 18 | SESSION_DRIVER=cookie 19 | SESSION_LIFETIME=120 20 | 21 | MEMCACHED_HOST=127.0.0.1 22 | 23 | REDIS_HOST=127.0.0.1 24 | REDIS_PASSWORD=null 25 | REDIS_PORT=6379 26 | 27 | MAIL_MAILER=smtp 28 | MAIL_HOST=mailhog 29 | MAIL_PORT=1025 30 | MAIL_USERNAME=null 31 | MAIL_PASSWORD=null 32 | MAIL_ENCRYPTION=null 33 | MAIL_FROM_ADDRESS="hello@example.com" 34 | MAIL_FROM_NAME="${APP_NAME}" 35 | 36 | AWS_ACCESS_KEY_ID= 37 | AWS_SECRET_ACCESS_KEY= 38 | AWS_DEFAULT_REGION=us-east-1 39 | AWS_BUCKET= 40 | AWS_USE_PATH_STYLE_ENDPOINT=false 41 | 42 | PUSHER_APP_ID= 43 | PUSHER_APP_KEY= 44 | PUSHER_APP_SECRET= 45 | PUSHER_HOST= 46 | PUSHER_PORT=443 47 | PUSHER_SCHEME=https 48 | PUSHER_APP_CLUSTER=mt1 49 | 50 | VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 51 | VITE_PUSHER_HOST="${PUSHER_HOST}" 52 | VITE_PUSHER_PORT="${PUSHER_PORT}" 53 | VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" 54 | VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 55 | 56 | UNREAL_RPC_SERVER_SOCKET= 57 | UNREAL_RPC_SERVER_ADDRESS= 58 | UNREAL_RPC_SERVER_PORT= 59 | UNREAL_RPC_METHOD= 60 | UNREAL_RPC_USER_USERNAME= 61 | UNREAL_RPC_USER_PASSWORD= 62 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('index'); 15 | 16 | Route::get('/lang/{lang}', LanguageController::class)->name('lang'); 17 | 18 | Route::middleware(['auth'])->group(static function () { 19 | Route::get('/dashboard', DashboardController::class)->name('dashboard'); 20 | 21 | Route::get('/users', [UserController::class, 'index'])->name('users'); 22 | Route::get('/channels', [ChannelController::class, 'index'])->name('channels'); 23 | 24 | Route::get('/bans', [BanController::class, 'index'])->name('bans.index'); 25 | Route::post('/bans', [BanController::class, 'store'])->name('bans.store'); 26 | Route::put('/bans', [BanController::class, 'update'])->name('bans.update'); 27 | Route::delete('/bans', [BanController::class, 'destroy'])->name('bans.destroy'); 28 | 29 | Route::get('/spamfilter', [SpamfilterController::class, 'index'])->name('spamfilter.index'); 30 | Route::post('/spamfilter', [SpamfilterController::class, 'store'])->name('spamfilter.store'); 31 | Route::put('/spamfilter', [SpamfilterController::class, 'update'])->name('spamfilter.update'); 32 | Route::delete('/spamfilter', [SpamfilterController::class, 'destroy'])->name('spamfilter.destroy'); 33 | }); 34 | 35 | require_once __DIR__ . '/auth.php'; 36 | -------------------------------------------------------------------------------- /resources/js/Pagelets/Channels.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 54 | 55 | 58 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 30 | 31 | $this->routes(static function () { 32 | Route::middleware('api') 33 | ->prefix('api') 34 | ->group(base_path('routes/api.php')); 35 | 36 | Route::middleware('web') 37 | ->group(base_path('routes/web.php')); 38 | 39 | Route::middleware('web') 40 | ->group(base_path('routes/auth.php')); 41 | }); 42 | } 43 | 44 | /** 45 | * Configure the rate limiters for the application. 46 | * 47 | * @return void 48 | */ 49 | protected function configureRateLimiting(): void 50 | { 51 | RateLimiter::for('api', static function (Request $request) { 52 | return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); 53 | }); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/Http/Middleware/HandleInertiaRequests.php: -------------------------------------------------------------------------------- 1 | [ 39 | 'data' => $request->session()->get('message') ?? false, 40 | ], 41 | 'auth' => [ 42 | 'user' => $request->user(), 43 | ], 44 | 'ziggy' => function () use ($request) { 45 | return array_merge((new Ziggy)->toArray(), [ 46 | 'location' => $request->url(), 47 | ]); 48 | }, 49 | 'app' => [ 50 | 'name' => config('app.name'), 51 | 'url' => config('app.url'), 52 | 'debug' => config('app.debug'), 53 | 'lang' => session('_lang') ?? app()->getLocale(), 54 | ] 55 | ]); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /resources/js/Pagelets/Bans.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 54 | 55 | 62 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 65536, 48 | 'threads' => 1, 49 | 'time' => 4, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | import vue from '@vitejs/plugin-vue'; 4 | import { homedir } from 'os'; 5 | import { resolve } from 'path'; 6 | import fs from 'fs'; 7 | import os from 'os'; 8 | 9 | export default defineConfig({ 10 | server: detectServerConfig(), 11 | plugins: [ 12 | laravel({ 13 | input: 'resources/js/app.js', 14 | refresh: true 15 | }), 16 | vue({ 17 | template: { 18 | transformAssetUrls: { 19 | base: null, 20 | includeAbsolute: false, 21 | }, 22 | }, 23 | }), 24 | ], 25 | resolve: { 26 | alias: { 27 | "@": "/resources/js" 28 | } 29 | } 30 | }) 31 | 32 | function detectServerConfig() { 33 | let host = 'unreal.test'; 34 | 35 | let keyPath = ''; 36 | let certificatePath = ''; 37 | if(os.platform() === "linux") { 38 | // This is just my setup for working under WSL2 (Ubuntu) with self-signed certs generated by easyrsa. 39 | keyPath = resolve(homedir(), `easyrsa/pki/private/Unreal.key`) 40 | certificatePath = resolve(homedir(), `easyrsa/pki/issued/Unreal.crt`) 41 | } else if(os.platform() === "darwin") { 42 | // MacOS using Laravel Valet. 43 | keyPath = resolve(homedir(), `.config/valet/Certificates/${host}.key`) 44 | certificatePath = resolve(homedir(), `.config/valet/Certificates/${host}.crt`) 45 | } 46 | 47 | if (!fs.existsSync(keyPath) || !fs.existsSync(certificatePath)) { 48 | return {}; 49 | } 50 | 51 | return { 52 | host, 53 | https: { 54 | key: fs.readFileSync(keyPath), 55 | cert: fs.readFileSync(certificatePath) 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = $kernel->handle( 52 | $request = Request::capture() 53 | )->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /app/Http/Controllers/DashboardController.php: -------------------------------------------------------------------------------- 1 | has('irc_stats')) { 18 | $url = sprintf('%s://%s:%s@%s:%s/api', 19 | in_array(config('unrealircd.rpc.method'), ['websockets', 'wss', 'wockets', 'websocks']) ? 'wss' : 'https', 20 | auth()->user()->username, 21 | Crypt::decryptString(session('user_password')), 22 | config('unrealircd.server.host'), 23 | config('unrealircd.server.port') 24 | ); 25 | 26 | $credentials = sprintf("%s:%s", 27 | auth()->user()->username, 28 | Crypt::decryptString(session('user_password')), 29 | ); 30 | 31 | $users = new User($url, $credentials, ["tls_verify" => config('unrealircd.tls_verify')]); 32 | $channels = new Channel($url, $credentials, ["tls_verify" => config('unrealircd.tls_verify')]); 33 | $bans = new Ban($url, $credentials, ["tls_verify" => config('unrealircd.tls_verify')]); 34 | 35 | cache()->add('irc_stats', json_encode([ 36 | 'users' => $users->get()->list ?? [], 37 | 'channels' => $channels->get()->list ?? [], 38 | 'bans' => $bans->get()->list ?? [] 39 | ]), Carbon::now()->addSeconds(config('app.debug') ? 15 : 120)); 40 | } 41 | 42 | $stats = json_decode(cache('irc_stats')); 43 | 44 | return Inertia::render('Dashboard', [ 45 | 'data' => [ 46 | 'users' => $stats->users, 47 | 'channels' => $stats->channels, 48 | 'bans' => $stats->bans, 49 | ] 50 | ]); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | get('username'), 26 | $request->get('password'), 27 | config('unrealircd.server.host'), 28 | config('unrealircd.server.port') 29 | ); 30 | 31 | $credentials = sprintf("%s:%s", 32 | $request->get('username'), 33 | $request->get('password') 34 | ); 35 | 36 | $query = new Connection($url, $credentials, ["tls_verify" => config('unrealircd.tls_verify')]); 37 | 38 | $response = $query->query('user.list'); 39 | 40 | if(!is_bool($response)) { 41 | $user = User::whereUsername($request->get('username')); 42 | if($user->count() === 0) { 43 | $user = User::create([ 44 | 'username' => $request->get('username'), 45 | 'password' => Hash::make($request->get('password'))] 46 | ); 47 | } else { 48 | $user = $user->first(); 49 | } 50 | 51 | session()->put('user_password', Crypt::encryptString($request->get('password'))); 52 | 53 | auth()->login($user); 54 | return redirect()->route('dashboard'); 55 | } 56 | } 57 | 58 | public function signout(Request $request) 59 | { 60 | auth()->logout(); 61 | 62 | $request->session()->invalidate(); 63 | $request->session()->regenerateToken(); 64 | 65 | return true; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": ["framework", "laravel"], 6 | "license": "MIT", 7 | "require": { 8 | "php": "^8.0.2", 9 | "guzzlehttp/guzzle": "^7.2", 10 | "inertiajs/inertia-laravel": "^0.5.4", 11 | "laravel/framework": "^9.19", 12 | "laravel/sanctum": "^2.8", 13 | "laravel/tinker": "^2.7", 14 | "php-open-source-saver/jwt-auth": "^1.4", 15 | "tightenco/ziggy": "^1.0", 16 | "unrealircd/unrealircd-rpc": "dev-main" 17 | }, 18 | "require-dev": { 19 | "barryvdh/laravel-ide-helper": "^2.12", 20 | "brianium/paratest": "^6.6", 21 | "fakerphp/faker": "^1.9.1", 22 | "laravel/breeze": "^1.10", 23 | "laravel/sail": "^1.0.1", 24 | "mockery/mockery": "^1.4.4", 25 | "nunomaduro/collision": "^6.1", 26 | "phpunit/phpunit": "^9.5.10", 27 | "spatie/laravel-ignition": "^1.0" 28 | }, 29 | "autoload": { 30 | "psr-4": { 31 | "App\\": "app/", 32 | "Database\\Factories\\": "database/factories/", 33 | "Database\\Seeders\\": "database/seeders/" 34 | } 35 | }, 36 | "autoload-dev": { 37 | "psr-4": { 38 | "Tests\\": "tests/" 39 | } 40 | }, 41 | "scripts": { 42 | "post-autoload-dump": [ 43 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 44 | "@php artisan package:discover --ansi" 45 | ], 46 | "post-update-cmd": [ 47 | "@php artisan vendor:publish --tag=laravel-assets --ansi --force" 48 | ], 49 | "post-root-package-install": [ 50 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 51 | ], 52 | "post-create-project-cmd": [ 53 | "@php artisan key:generate --ansi" 54 | ] 55 | }, 56 | "extra": { 57 | "laravel": { 58 | "dont-discover": [] 59 | } 60 | }, 61 | "config": { 62 | "optimize-autoloader": true, 63 | "preferred-install": "dist", 64 | "sort-packages": true 65 | }, 66 | "minimum-stability": "dev", 67 | "prefer-stable": true 68 | } 69 | -------------------------------------------------------------------------------- /lang/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "UnrealIRCd Admin Panel": "UnrealIRCd Admin Panel", 3 | "Hi": "Hi", 4 | "IRC User": "IRC User", 5 | "Sign out": "Sign out", 6 | "Dashboard": "Dashboard", 7 | "Users": "Users", 8 | "Channels": "Channels", 9 | "Bans": "Bans", 10 | "on IRC": "on IRC", 11 | "Debug Mode is currently enabled.": "Debug Mode is currently enabled.", 12 | "Something went wrong": "Something went wrong", 13 | "Success!": "Success!", 14 | "Your language has been updated.": "Your language has been updated.", 15 | "That language is not supported.": "That language is not supported.", 16 | "Error": "Error", 17 | "English": "English", 18 | "Turkish": "Turkish", 19 | "Spanish": "Spanish", 20 | 21 | "Log in to": "Log in to", 22 | "Please Sign In": "Please Sign In", 23 | "Please use your oper credentials to log in.": "Please use your oper credentials to log in.", 24 | "Whoops, something went wrong.": "Whoops, something went wrong.", 25 | "Password": "Password", 26 | "Sign in": "Sign in", 27 | "You have been signed out.": "You have been signed out.", 28 | 29 | "Basic Stats": "Basic Stats", 30 | "Clear Filters": "Clear Filters", 31 | "Filter Table": "Filter Table", 32 | 33 | "Username": "Username", 34 | "Server": "Server", 35 | "Modes": "Modes", 36 | "VHost": "VHost", 37 | "Toggle VHost": "Toggle VHost", 38 | "No vhost for user": "No vhost for user", 39 | "Hide Services Bots": "Hide Services Bots", 40 | "Hide Bots": "Hide Bots", 41 | "Show only TLS Users": "Show only TLS Users", 42 | 43 | "Type": "Type", 44 | "Name": "Name", 45 | "Reason": "Reason", 46 | "Set At": "Set At", 47 | "Set By": "Set By", 48 | "Expires At": "Expires At", 49 | "Only G-Lines": "Only G-Lines", 50 | "Only Z-Lines": "Only Z-Lines", 51 | "Only K-Lines": "Only K-Lines", 52 | "Only GZ-Lines": "Only GZ-Lines", 53 | "Only SHUN": "Only SHUN", 54 | "Unable to remove :ban": "Unable to remove :ban", 55 | "Are you sure you want to remove this :ban": "Are you sure you want to remove this :ban", 56 | "New Ban": "New Ban", 57 | "Create Ban": "Create Ban", 58 | "Update Ban": "Update Ban", 59 | "To change the host/ip mask, please create a new entry.": "To change the host/ip mask, please create a new entry." 60 | } 61 | -------------------------------------------------------------------------------- /lang/tr.json: -------------------------------------------------------------------------------- 1 | { 2 | "UnrealIRCd Admin Panel": "UnrealIRCd Admin Panel", 3 | "Hi": "Merhaba", 4 | "IRC User": "IRC Kullanıcısı", 5 | "Sign out": "Oturumu Kapat", 6 | "Dashboard": "Gösterge Paneli", 7 | "Users": "Kullanıcılar", 8 | "Channels": "Kanallar", 9 | "Bans": "Yasaklar", 10 | "on IRC": "IRC'de", 11 | "Debug Mode is currently enabled.": "Hata Ayıklama Modu şu anda etkin.", 12 | "Something went wrong": "Bir şeyler yanlış gitti", 13 | "Success!": "Başarılı!", 14 | "Your language has been updated.": "Diliniz Güncellendi.", 15 | "That language is not supported.": "Bu dil Desteklenmiyor.", 16 | "Error": "Hata", 17 | "English": "English", 18 | "Turkish": "Turkish", 19 | "Spanish": "Spanish", 20 | 21 | "Log in to": "Giriş", 22 | "Please Sign In": "Lütfen giriş yapın", 23 | "Please use your oper credentials to log in.": "Lütfen oturum açmak için oper kimlik bilgilerinizi kullanın.", 24 | "Whoops, something went wrong.": "Hata, bir şeyler ters gitti.", 25 | "Password": "Şifre", 26 | "Sign in": "Giriş yap", 27 | 28 | "Basic Stats": "Temel İstatistikler", 29 | "Clear Filters": "Filtreleri Temizle", 30 | "Filter Table": "Filtre Tablosu", 31 | 32 | "Username": "Kullanıcı adı", 33 | "Server": "Sunucu", 34 | "Modes": "Modlar", 35 | "VHost": "VHost", 36 | "Toggle VHost": "VHost'u Aç/Kapat", 37 | "No vhost for user": "Kullanıcı için vhost yok", 38 | "Hide Services Bots": "Servis Botlarını Gizle", 39 | "Hide Bots": "Botları Gizle", 40 | "Show only TLS Users": "Yalnızca TLS Kullanıcılarını Göster", 41 | 42 | "Type": "Tip", 43 | "Name": "İsim", 44 | "Reason": "Sebep", 45 | "Set At": "Kurucu", 46 | "Set By": "Ayarlayan", 47 | "Expires At": "Sona Erme Tarihi", 48 | "Only G-Lines": "Yalnız G-Lines", 49 | "Only Z-Lines": "Yalnız Z-Lines", 50 | "Only K-Lines": "Yalnız K-Lines", 51 | "Only GZ-Lines": "Yalnız GZ-Lines", 52 | "Only SHUN": "Yalnız SHUN", 53 | "Unable to remove :ban": ":ban Kaldırılamıyor", 54 | "Are you sure you want to remove this :ban": "Bunu kaldırmak istediğinizden emin misiniz :ban", 55 | "New Ban": "Yeni Yasak", 56 | "Create Ban": "Yasak Oluştur", 57 | "Update Ban": "Yasağı Güncelle", 58 | "To change the host/ip mask, please create a new entry.": "Ana bilgisayar/ip maskesini değiştirmek için lütfen yeni bir giriş oluşturun." 59 | } 60 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'host' => env('PUSHER_HOST', 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', 40 | 'port' => env('PUSHER_PORT', 443), 41 | 'scheme' => env('PUSHER_SCHEME', 'https'), 42 | 'encrypted' => true, 43 | 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', 44 | ], 45 | 'client_options' => [ 46 | // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html 47 | ], 48 | ], 49 | 50 | 'ably' => [ 51 | 'driver' => 'ably', 52 | 'key' => env('ABLY_KEY'), 53 | ], 54 | 55 | 'redis' => [ 56 | 'driver' => 'redis', 57 | 'connection' => 'default', 58 | ], 59 | 60 | 'log' => [ 61 | 'driver' => 'log', 62 | ], 63 | 64 | 'null' => [ 65 | 'driver' => 'null', 66 | ], 67 | 68 | ], 69 | 70 | ]; 71 | -------------------------------------------------------------------------------- /lang/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "UnrealIRCd Admin Panel": "Panel de administración de UnrealIRCD", 3 | "Hi": "Hola", 4 | "IRC User": "Usuario IRC", 5 | "Sign out": "Desconectar", 6 | "Dashboard": "Tablero", 7 | "Users": "Usuarios", 8 | "Channels": "Canales", 9 | "Bans": "Baneos", 10 | "on IRC": "En IRC", 11 | "Debug Mode is currently enabled.": "El modo de debug está habilitado actualmente.", 12 | "Something went wrong": "¡Algo salió mal", 13 | "Success!": "¡Éxito!", 14 | "Your language has been updated.": "Su idioma ha sido actualizado.", 15 | "That language is not supported.": "Ese idioma no es compatible.", 16 | "Error": "Error", 17 | "English": "Inglés", 18 | "Turkish": "Turko", 19 | "Spanish": "Español", 20 | 21 | "Log in to": "Iniciar sesión en", 22 | "Please Sign In": "Por favor, logeate", 23 | "Please use your oper credentials to log in.": "Utilice sus credenciales de operador para iniciar sesión.", 24 | "Whoops, something went wrong.": "Whoops, algo salió mal.", 25 | "Password": "Contraseña", 26 | "Sign in": "Inicia sesión", 27 | 28 | "Basic Stats": "Estadísticas básicas", 29 | "Clear Filters": "Borrar filtros", 30 | "Filter Table": "Tabla de filtros", 31 | 32 | "Username": "Nombre de usuario", 33 | "Server": "Servidor", 34 | "Modes": "Modos", 35 | "VHost": "IPVirtual", 36 | "Toggle VHost": "Cambiar IPVirtual", 37 | "No vhost for user": "Usuario sin IPVirtual", 38 | "Hide Services Bots": "Ocultar robots de servicios", 39 | "Hide Bots": "Ocultar robots", 40 | "Show only TLS Users": "Mostrar solo usuarios conectados con TLS", 41 | 42 | "Type": "Tipo", 43 | "Name": "Nombre", 44 | "Reason": "Razón", 45 | "Set At": "Seteado el", 46 | "Set By": "Seteado por", 47 | "Expires At": "Expira en", 48 | "Only G-Lines": "Sólo G-Lines", 49 | "Only Z-Lines": "Sólo Z-Lines", 50 | "Only K-Lines": "Sólo K-Lines", 51 | "Only GZ-Lines": "Sólo GZ-Lines", 52 | "Only SHUN": "Sólo SHUN", 53 | "Unable to remove :ban": "No se puede quitar :ban", 54 | "Are you sure you want to remove this :ban": "¿Estás seguro de que quieres eliminar esto? :ban", 55 | "New Ban": "Nuevo baneo", 56 | "Create Ban": "Crear un baneo", 57 | "Update Ban": "Actualizar un baneo", 58 | "To change the host/ip mask, please create a new entry.": "Para cambiar la máscara de host/ip, crée una nueva entrada." 59 | } 60 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 51 | */ 52 | protected $fillable = [ 53 | 'username', 54 | 'password', 55 | ]; 56 | 57 | /** 58 | * The attributes that should be hidden for serialization. 59 | * 60 | * @var array 61 | */ 62 | protected $hidden = [ 63 | 'password', 64 | 'remember_token', 65 | ]; 66 | 67 | /** 68 | * The attributes that should be cast. 69 | * 70 | * @var array 71 | */ 72 | protected $casts = [ 73 | 'email_verified_at' => 'datetime', 74 | ]; 75 | } 76 | -------------------------------------------------------------------------------- /config/sanctum.php: -------------------------------------------------------------------------------- 1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( 19 | '%s%s', 20 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', 21 | Sanctum::currentApplicationUrlWithPort() 22 | ))), 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Sanctum Guards 27 | |-------------------------------------------------------------------------- 28 | | 29 | | This array contains the authentication guards that will be checked when 30 | | Sanctum is trying to authenticate a request. If none of these guards 31 | | are able to authenticate the request, Sanctum will use the bearer 32 | | token that's present on an incoming request for authentication. 33 | | 34 | */ 35 | 36 | 'guard' => ['web'], 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Expiration Minutes 41 | |-------------------------------------------------------------------------- 42 | | 43 | | This value controls the number of minutes until an issued token will be 44 | | considered expired. If this value is null, personal access tokens do 45 | | not expire. This won't tweak the lifetime of first-party sessions. 46 | | 47 | */ 48 | 49 | 'expiration' => null, 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Sanctum Middleware 54 | |-------------------------------------------------------------------------- 55 | | 56 | | When authenticating your first-party SPA with Sanctum you may need to 57 | | customize some of the middleware Sanctum uses while processing the 58 | | request. You may change the middleware listed below as required. 59 | | 60 | */ 61 | 62 | 'middleware' => [ 63 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, 64 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DISK', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure as many filesystem "disks" as you wish, and you 24 | | may even configure multiple disks of the same driver. Defaults have 25 | | been set up for each driver as an example of the required values. 26 | | 27 | | Supported Drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app'), 36 | 'throw' => false, 37 | ], 38 | 39 | 'public' => [ 40 | 'driver' => 'local', 41 | 'root' => storage_path('app/public'), 42 | 'url' => env('APP_URL').'/storage', 43 | 'visibility' => 'public', 44 | 'throw' => false, 45 | ], 46 | 47 | 's3' => [ 48 | 'driver' => 's3', 49 | 'key' => env('AWS_ACCESS_KEY_ID'), 50 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 51 | 'region' => env('AWS_DEFAULT_REGION'), 52 | 'bucket' => env('AWS_BUCKET'), 53 | 'url' => env('AWS_URL'), 54 | 'endpoint' => env('AWS_ENDPOINT'), 55 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 56 | 'throw' => false, 57 | ], 58 | 59 | ], 60 | 61 | /* 62 | |-------------------------------------------------------------------------- 63 | | Symbolic Links 64 | |-------------------------------------------------------------------------- 65 | | 66 | | Here you may configure the symbolic links that will be created when the 67 | | `storage:link` Artisan command is executed. The array keys should be 68 | | the locations of the links and the values should be their targets. 69 | | 70 | */ 71 | 72 | 'links' => [ 73 | public_path('storage') => storage_path('app/public'), 74 | ], 75 | 76 | ]; 77 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | 16 | */ 17 | protected $middleware = [ 18 | // \App\Http\Middleware\TrustHosts::class, 19 | \App\Http\Middleware\TrustProxies::class, 20 | \Illuminate\Http\Middleware\HandleCors::class, 21 | \App\Http\Middleware\PreventRequestsDuringMaintenance::class, 22 | \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, 23 | \App\Http\Middleware\TrimStrings::class, 24 | \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, 25 | Localization::class, 26 | ]; 27 | 28 | /** 29 | * The application's route middleware groups. 30 | * 31 | * @var array> 32 | */ 33 | protected $middlewareGroups = [ 34 | 'web' => [ 35 | \App\Http\Middleware\EncryptCookies::class, 36 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 37 | \Illuminate\Session\Middleware\StartSession::class, 38 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 39 | \App\Http\Middleware\VerifyCsrfToken::class, 40 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 41 | \App\Http\Middleware\HandleInertiaRequests::class, 42 | ], 43 | 44 | 'api' => [ 45 | // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 46 | 'throttle:api', 47 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 48 | ], 49 | ]; 50 | 51 | /** 52 | * The application's route middleware. 53 | * 54 | * These middleware may be assigned to groups or used individually. 55 | * 56 | * @var array 57 | */ 58 | protected $routeMiddleware = [ 59 | 'auth' => \App\Http\Middleware\Authenticate::class, 60 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 61 | 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, 62 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 63 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 64 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 65 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 66 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 67 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 68 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 69 | ]; 70 | } 71 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | 'after_commit' => false, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'retry_after' => 90, 50 | 'block_for' => 0, 51 | 'after_commit' => false, 52 | ], 53 | 54 | 'sqs' => [ 55 | 'driver' => 'sqs', 56 | 'key' => env('AWS_ACCESS_KEY_ID'), 57 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 58 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 59 | 'queue' => env('SQS_QUEUE', 'default'), 60 | 'suffix' => env('SQS_SUFFIX'), 61 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 62 | 'after_commit' => false, 63 | ], 64 | 65 | 'redis' => [ 66 | 'driver' => 'redis', 67 | 'connection' => 'default', 68 | 'queue' => env('REDIS_QUEUE', 'default'), 69 | 'retry_after' => 90, 70 | 'block_for' => null, 71 | 'after_commit' => false, 72 | ], 73 | 74 | ], 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Failed Queue Jobs 79 | |-------------------------------------------------------------------------- 80 | | 81 | | These options configure the behavior of failed queue job logging so you 82 | | can control which database and table are used to store the jobs that 83 | | have failed. You may change them to any database / table you wish. 84 | | 85 | */ 86 | 87 | 'failed' => [ 88 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 89 | 'database' => env('DB_CONNECTION', 'mysql'), 90 | 'table' => 'failed_jobs', 91 | ], 92 | 93 | ]; 94 | -------------------------------------------------------------------------------- /resources/js/Pages/Dashboard.vue: -------------------------------------------------------------------------------- 1 | 57 | 58 | 90 | 91 | 94 | -------------------------------------------------------------------------------- /tests/Feature/DashboardTest.php: -------------------------------------------------------------------------------- 1 | post(route('login'), [ 26 | 'username' => 'apiuser', 27 | 'password' => 'password', 28 | ]); 29 | 30 | $this->user = auth()->user(); 31 | } 32 | 33 | /** 34 | * A basic feature test example. 35 | * 36 | * @return void 37 | */ 38 | public function test_users_on_the_dashboard(): void 39 | { 40 | 41 | $response = $this->actingAs($this->user) 42 | ->get(route('dashboard')); 43 | 44 | $response->assertStatus(HttpResponse::HTTP_OK) 45 | ->assertSee(__('Dashboard')) 46 | ->assertSee(__('Basic Stats')) 47 | ->assertSee(__('Users')) 48 | ->assertSee(__('Channels')) 49 | ->assertSee(__('Bans')) 50 | 51 | ->assertSee('OperServ') 52 | ->assertSee('HostServ') 53 | ->assertSee('NickServ') 54 | ->assertSee('ChanServ') 55 | ->assertSee('MemoServ') 56 | ->assertSee('BotServ') 57 | ->assertSee('Global') 58 | 59 | ->assertSee('Username') 60 | ->assertSee('Server') 61 | ->assertSee('Channels') 62 | ->assertSee('Modes') 63 | ->assertSee('VHost') 64 | ->assertSee('ioqBS'); 65 | } 66 | 67 | public function test_channels_on_the_dashboard() 68 | { 69 | $response = $this->actingAs($this->user) 70 | ->get(route('dashboard')); 71 | 72 | $response->assertStatus(HttpResponse::HTTP_OK) 73 | ->assertSee(__('Dashboard')) 74 | ->assertSee(__('Basic Stats')) 75 | ->assertSee(__('Users')) 76 | ->assertSee(__('Channels')) 77 | ->assertSee(__('Bans')) 78 | 79 | ->assertSee('#chat') 80 | ->assertSee('#ops') 81 | ->assertSee('#services') 82 | ->assertSee('nrtP') 83 | ->assertSee('Name') 84 | ->assertSee('num_users') 85 | ->assertSee('Modes'); 86 | } 87 | 88 | public function test_bans_on_the_dashboard() 89 | { 90 | $response = $this->actingAs($this->user) 91 | ->get(route('dashboard')); 92 | 93 | $response->assertStatus(HttpResponse::HTTP_OK) 94 | ->assertSee(__('Dashboard')) 95 | ->assertSee(__('Basic Stats')) 96 | ->assertSee(__('Users')) 97 | ->assertSee(__('Channels')) 98 | ->assertSee(__('Bans')) 99 | 100 | ->assertSee('type') 101 | ->assertSee('name') 102 | ->assertSee('expire_at') 103 | ->assertSee('reason') 104 | ->assertSee('set_at_string') 105 | ->assertSee('set_by') 106 | ->assertSee('zline') 107 | ->assertSee('Hate you') 108 | ->assertSee('*@195.86.232.81') 109 | ->assertSee('Never') 110 | ->assertSee('-config-'); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb", "octane", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | 'lock_connection' => null, 50 | ], 51 | 52 | 'file' => [ 53 | 'driver' => 'file', 54 | 'path' => storage_path('framework/cache/data'), 55 | ], 56 | 57 | 'memcached' => [ 58 | 'driver' => 'memcached', 59 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 60 | 'sasl' => [ 61 | env('MEMCACHED_USERNAME'), 62 | env('MEMCACHED_PASSWORD'), 63 | ], 64 | 'options' => [ 65 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 66 | ], 67 | 'servers' => [ 68 | [ 69 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 70 | 'port' => env('MEMCACHED_PORT', 11211), 71 | 'weight' => 100, 72 | ], 73 | ], 74 | ], 75 | 76 | 'redis' => [ 77 | 'driver' => 'redis', 78 | 'connection' => 'cache', 79 | 'lock_connection' => 'default', 80 | ], 81 | 82 | 'dynamodb' => [ 83 | 'driver' => 'dynamodb', 84 | 'key' => env('AWS_ACCESS_KEY_ID'), 85 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 86 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 87 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 88 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 89 | ], 90 | 91 | 'octane' => [ 92 | 'driver' => 'octane', 93 | ], 94 | 95 | ], 96 | 97 | /* 98 | |-------------------------------------------------------------------------- 99 | | Cache Key Prefix 100 | |-------------------------------------------------------------------------- 101 | | 102 | | When utilizing the APC, database, memcached, Redis, or DynamoDB cache 103 | | stores there might be other applications using the same cache. For 104 | | that reason, you may prefix every cache key to avoid collisions. 105 | | 106 | */ 107 | 108 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /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", 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 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | ], 59 | 60 | 'sendmail' => [ 61 | 'transport' => 'sendmail', 62 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 63 | ], 64 | 65 | 'log' => [ 66 | 'transport' => 'log', 67 | 'channel' => env('MAIL_LOG_CHANNEL'), 68 | ], 69 | 70 | 'array' => [ 71 | 'transport' => 'array', 72 | ], 73 | 74 | 'failover' => [ 75 | 'transport' => 'failover', 76 | 'mailers' => [ 77 | 'smtp', 78 | 'log', 79 | ], 80 | ], 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Global "From" Address 86 | |-------------------------------------------------------------------------- 87 | | 88 | | You may wish for all e-mails sent by your application to be sent from 89 | | the same address. Here, you may specify a name and address that is 90 | | used globally for all e-mails that are sent by your application. 91 | | 92 | */ 93 | 94 | 'from' => [ 95 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 96 | 'name' => env('MAIL_FROM_NAME', 'Example'), 97 | ], 98 | 99 | /* 100 | |-------------------------------------------------------------------------- 101 | | Markdown Mail Settings 102 | |-------------------------------------------------------------------------- 103 | | 104 | | If you are using Markdown based email rendering, you may configure your 105 | | theme and component paths here, allowing you to customize the design 106 | | of the emails. Or, you may simply stick with the Laravel defaults! 107 | | 108 | */ 109 | 110 | 'markdown' => [ 111 | 'theme' => 'default', 112 | 113 | 'paths' => [ 114 | resource_path('views/vendor/mail'), 115 | ], 116 | ], 117 | 118 | ]; 119 | -------------------------------------------------------------------------------- /resources/js/Pagelets/Users.vue: -------------------------------------------------------------------------------- 1 | 62 | 63 | 93 | 94 | 101 | -------------------------------------------------------------------------------- /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 | 'api' => [ 45 | 'driver' => 'jwt', 46 | 'provider' => 'users' 47 | ] 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\Models\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | You may specify multiple password reset configurations if you have more 85 | | than one user table or model in the application and you want to have 86 | | separate password reset settings based on the specific user types. 87 | | 88 | | The expire time is the number of minutes that each reset token will be 89 | | considered valid. This security feature keeps tokens short-lived so 90 | | they have less time to be guessed. You may change this as needed. 91 | | 92 | */ 93 | 94 | 'passwords' => [ 95 | 'users' => [ 96 | 'provider' => 'users', 97 | 'table' => 'password_resets', 98 | 'expire' => 60, 99 | 'throttle' => 60, 100 | ], 101 | ], 102 | 103 | /* 104 | |-------------------------------------------------------------------------- 105 | | Password Confirmation Timeout 106 | |-------------------------------------------------------------------------- 107 | | 108 | | Here you may define the amount of seconds before a password confirmation 109 | | times out and the user is prompted to re-enter their password via the 110 | | confirmation screen. By default, the timeout lasts for three hours. 111 | | 112 | */ 113 | 114 | 'password_timeout' => 10800, 115 | 116 | ]; 117 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Deprecations Log Channel 25 | |-------------------------------------------------------------------------- 26 | | 27 | | This option controls the log channel that should be used to log warnings 28 | | regarding deprecated PHP and library features. This allows you to get 29 | | your application ready for upcoming major versions of dependencies. 30 | | 31 | */ 32 | 33 | 'deprecations' => [ 34 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 35 | 'trace' => false, 36 | ], 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Log Channels 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Here you may configure the log channels for your application. Out of 44 | | the box, Laravel uses the Monolog PHP logging library. This gives 45 | | you a variety of powerful log handlers / formatters to utilize. 46 | | 47 | | Available Drivers: "single", "daily", "slack", "syslog", 48 | | "errorlog", "monolog", 49 | | "custom", "stack" 50 | | 51 | */ 52 | 53 | 'channels' => [ 54 | 'stack' => [ 55 | 'driver' => 'stack', 56 | 'channels' => ['single', 'daily'], 57 | 'ignore_exceptions' => true, 58 | ], 59 | 60 | 'single' => [ 61 | 'driver' => 'single', 62 | 'path' => storage_path('logs/laravel.log'), 63 | 'level' => env('LOG_LEVEL', 'debug'), 64 | ], 65 | 66 | 'daily' => [ 67 | 'driver' => 'daily', 68 | 'path' => storage_path('logs/laravel.log'), 69 | 'level' => env('LOG_LEVEL', 'debug'), 70 | 'days' => 14, 71 | ], 72 | 73 | 'slack' => [ 74 | 'driver' => 'slack', 75 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 76 | 'username' => 'Laravel Log', 77 | 'emoji' => ':boom:', 78 | 'level' => env('LOG_LEVEL', 'critical'), 79 | ], 80 | 81 | 'papertrail' => [ 82 | 'driver' => 'monolog', 83 | 'level' => env('LOG_LEVEL', 'debug'), 84 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 85 | 'handler_with' => [ 86 | 'host' => env('PAPERTRAIL_URL'), 87 | 'port' => env('PAPERTRAIL_PORT'), 88 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), 89 | ], 90 | ], 91 | 92 | 'stderr' => [ 93 | 'driver' => 'monolog', 94 | 'level' => env('LOG_LEVEL', 'debug'), 95 | 'handler' => StreamHandler::class, 96 | 'formatter' => env('LOG_STDERR_FORMATTER'), 97 | 'with' => [ 98 | 'stream' => 'php://stderr', 99 | ], 100 | ], 101 | 102 | 'syslog' => [ 103 | 'driver' => 'syslog', 104 | 'level' => env('LOG_LEVEL', 'debug'), 105 | ], 106 | 107 | 'errorlog' => [ 108 | 'driver' => 'errorlog', 109 | 'level' => env('LOG_LEVEL', 'debug'), 110 | ], 111 | 112 | 'null' => [ 113 | 'driver' => 'monolog', 114 | 'handler' => NullHandler::class, 115 | ], 116 | 117 | 'emergency' => [ 118 | 'path' => storage_path('logs/laravel.log'), 119 | ], 120 | ], 121 | 122 | ]; 123 | -------------------------------------------------------------------------------- /app/Http/Controllers/BanController.php: -------------------------------------------------------------------------------- 1 | user(); 25 | 26 | $this->credentials = sprintf("%s:%s", 27 | $user->username, 28 | Crypt::decryptString(session('user_password')) 29 | ); 30 | 31 | $this->url = sprintf('%s://%s@%s:%s/api', 32 | in_array(config('unrealircd.rpc.method'), ['websockets', 'wss', 'wockets', 'websocks']) ? 'wss' : 'https', 33 | $this->credentials, 34 | config('unrealircd.server.host'), 35 | config('unrealircd.server.port') 36 | ); 37 | } 38 | 39 | /** 40 | * @return Response|JsonResponse 41 | * @throws InvalidArgumentException 42 | * @throws Exception 43 | */ 44 | public function index(): Response|JsonResponse 45 | { 46 | $this->setup(); 47 | 48 | if (!cache()->has('irc_lines')) { 49 | $bans = new Ban($this->url, $this->credentials, ["tls_verify" => config('unrealircd.tls_verify')]); 50 | 51 | cache()->add('irc_lines', json_encode([ 52 | 'bans' => $bans->get()->list ?? [] 53 | ]), Carbon::now()->addSeconds(config('app.debug') ? 15 : 120)); 54 | } 55 | 56 | $stats = json_decode(cache('irc_lines')); 57 | 58 | return Inertia::render('Bans', [ 59 | 'base_bans' => $stats->bans, 60 | ]); 61 | } 62 | 63 | public function store(Request $request) 64 | { 65 | $this->setup(); 66 | 67 | try { 68 | $bans = new Ban($this->url, $this->credentials, ["tls_verify" => config('unrealircd.tls_verify')]); 69 | 70 | if ($bans->add($request->get('name'), [ 71 | 'type' => $request->get('type_string'), 72 | 'reason' => $request->get('reason'), 73 | 'length' => Carbon::createFromFormat('Y-m-d H:i:s', $request->get('date') .' '. $request->get('time'))->diffInSeconds() 74 | ])) { 75 | cache()->forget('irc_lines'); 76 | return redirect()->route('bans', [], HttpResponse::HTTP_SEE_OTHER); 77 | } 78 | } catch (Exception $e) { 79 | return response()->json([ 80 | 'type' => 'error', 81 | 'message' => $e->getMessage(), 82 | ], HttpResponse::HTTP_INTERNAL_SERVER_ERROR); 83 | } 84 | } 85 | 86 | public function update(Request $request) 87 | { 88 | $this->setup(); 89 | 90 | try { 91 | $bans = new Ban($this->url, $this->credentials, ["tls_verify" => config('unrealircd.tls_verify')]); 92 | 93 | if ($bans->delete($request->get('name'), ['type' => $request->get('type')])) { 94 | $bans->add($request->get('name'), [ 95 | 'type' => $request->get('type'), 96 | 'reason' => $request->get('reason'), 97 | 'length' => Carbon::createFromFormat('Y-m-d H:i:s', $request->get('date') .' '. $request->get('time'))->diffInSeconds() 98 | ]); 99 | cache()->forget('irc_lines'); 100 | return response()->json([ 101 | 'type' => 'success', 102 | 'message' => 'Entry updated.' 103 | ]); 104 | } 105 | } catch (Exception $e) { 106 | return response()->json([ 107 | 'type' => 'error', 108 | 'message' => $e->getMessage(), 109 | ], HttpResponse::HTTP_INTERNAL_SERVER_ERROR); 110 | } 111 | } 112 | 113 | public function destroy(Request $request) 114 | { 115 | $this->setup(); 116 | 117 | try { 118 | $bans = new Ban($this->url, $this->credentials, ["tls_verify" => config('unrealircd.tls_verify')]); 119 | 120 | if ($bans->delete($request->get('name'), ['type' => $request->get('type')])) { 121 | cache()->forget('irc_lines'); 122 | return response()->json([ 123 | 'type' => 'success', 124 | 'message' => 'Entry deleted.' 125 | ]); 126 | } 127 | 128 | throw new Exception(__('Unable to remove :ban', $request->get('type'))); 129 | } catch (Exception $e) { 130 | return response()->json([ 131 | 'type' => 'error', 132 | 'message' => $e->getMessage(), 133 | ], HttpResponse::HTTP_INTERNAL_SERVER_ERROR); 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /resources/js/Pages/Bans.vue: -------------------------------------------------------------------------------- 1 | 52 | 53 | 141 | 142 | 149 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /resources/js/Pages/Auth/Login.vue: -------------------------------------------------------------------------------- 1 | 62 | 63 | 132 | 133 | 168 | -------------------------------------------------------------------------------- /resources/js/Components/Ban.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | 136 | 137 | 144 | -------------------------------------------------------------------------------- /resources/js/Layouts/Authenticated.vue: -------------------------------------------------------------------------------- 1 | 68 | 69 | 141 | 142 | 227 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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' => 'UTC', 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 | 185 | /* 186 | * Package Service Providers... 187 | */ 188 | 189 | /* 190 | * Application Service Providers... 191 | */ 192 | App\Providers\AppServiceProvider::class, 193 | App\Providers\AuthServiceProvider::class, 194 | // App\Providers\BroadcastServiceProvider::class, 195 | App\Providers\EventServiceProvider::class, 196 | App\Providers\RouteServiceProvider::class, 197 | 198 | ], 199 | 200 | /* 201 | |-------------------------------------------------------------------------- 202 | | Class Aliases 203 | |-------------------------------------------------------------------------- 204 | | 205 | | This array of class aliases will be registered when this application 206 | | is started. However, feel free to register as many as you wish as 207 | | the aliases are "lazy" loaded so they don't hinder performance. 208 | | 209 | */ 210 | 211 | 'aliases' => Facade::defaultAliases()->merge([ 212 | // 'ExampleClass' => App\Example\ExampleClass::class, 213 | ])->toArray(), 214 | 215 | ]; 216 | -------------------------------------------------------------------------------- /lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'accepted_if' => 'The :attribute must be accepted when :other is :value.', 18 | 'active_url' => 'The :attribute is not a valid URL.', 19 | 'after' => 'The :attribute must be a date after :date.', 20 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 21 | 'alpha' => 'The :attribute must only contain letters.', 22 | 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', 23 | 'alpha_num' => 'The :attribute must only contain letters and numbers.', 24 | 'array' => 'The :attribute must be an array.', 25 | 'before' => 'The :attribute must be a date before :date.', 26 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 27 | 'between' => [ 28 | 'array' => 'The :attribute must have between :min and :max items.', 29 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 30 | 'numeric' => 'The :attribute must be between :min and :max.', 31 | 'string' => 'The :attribute must be between :min and :max characters.', 32 | ], 33 | 'boolean' => 'The :attribute field must be true or false.', 34 | 'confirmed' => 'The :attribute confirmation does not match.', 35 | 'current_password' => 'The password is incorrect.', 36 | 'date' => 'The :attribute is not a valid date.', 37 | 'date_equals' => 'The :attribute must be a date equal to :date.', 38 | 'date_format' => 'The :attribute does not match the format :format.', 39 | 'declined' => 'The :attribute must be declined.', 40 | 'declined_if' => 'The :attribute must be declined when :other is :value.', 41 | 'different' => 'The :attribute and :other must be different.', 42 | 'digits' => 'The :attribute must be :digits digits.', 43 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 44 | 'dimensions' => 'The :attribute has invalid image dimensions.', 45 | 'distinct' => 'The :attribute field has a duplicate value.', 46 | 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.', 47 | 'email' => 'The :attribute must be a valid email address.', 48 | 'ends_with' => 'The :attribute must end with one of the following: :values.', 49 | 'enum' => 'The selected :attribute is invalid.', 50 | 'exists' => 'The selected :attribute is invalid.', 51 | 'file' => 'The :attribute must be a file.', 52 | 'filled' => 'The :attribute field must have a value.', 53 | 'gt' => [ 54 | 'array' => 'The :attribute must have more than :value items.', 55 | 'file' => 'The :attribute must be greater than :value kilobytes.', 56 | 'numeric' => 'The :attribute must be greater than :value.', 57 | 'string' => 'The :attribute must be greater than :value characters.', 58 | ], 59 | 'gte' => [ 60 | 'array' => 'The :attribute must have :value items or more.', 61 | 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', 62 | 'numeric' => 'The :attribute must be greater than or equal to :value.', 63 | 'string' => 'The :attribute must be greater than or equal to :value characters.', 64 | ], 65 | 'image' => 'The :attribute must be an image.', 66 | 'in' => 'The selected :attribute is invalid.', 67 | 'in_array' => 'The :attribute field does not exist in :other.', 68 | 'integer' => 'The :attribute must be an integer.', 69 | 'ip' => 'The :attribute must be a valid IP address.', 70 | 'ipv4' => 'The :attribute must be a valid IPv4 address.', 71 | 'ipv6' => 'The :attribute must be a valid IPv6 address.', 72 | 'json' => 'The :attribute must be a valid JSON string.', 73 | 'lt' => [ 74 | 'array' => 'The :attribute must have less than :value items.', 75 | 'file' => 'The :attribute must be less than :value kilobytes.', 76 | 'numeric' => 'The :attribute must be less than :value.', 77 | 'string' => 'The :attribute must be less than :value characters.', 78 | ], 79 | 'lte' => [ 80 | 'array' => 'The :attribute must not have more than :value items.', 81 | 'file' => 'The :attribute must be less than or equal to :value kilobytes.', 82 | 'numeric' => 'The :attribute must be less than or equal to :value.', 83 | 'string' => 'The :attribute must be less than or equal to :value characters.', 84 | ], 85 | 'mac_address' => 'The :attribute must be a valid MAC address.', 86 | 'max' => [ 87 | 'array' => 'The :attribute must not have more than :max items.', 88 | 'file' => 'The :attribute must not be greater than :max kilobytes.', 89 | 'numeric' => 'The :attribute must not be greater than :max.', 90 | 'string' => 'The :attribute must not be greater than :max characters.', 91 | ], 92 | 'mimes' => 'The :attribute must be a file of type: :values.', 93 | 'mimetypes' => 'The :attribute must be a file of type: :values.', 94 | 'min' => [ 95 | 'array' => 'The :attribute must have at least :min items.', 96 | 'file' => 'The :attribute must be at least :min kilobytes.', 97 | 'numeric' => 'The :attribute must be at least :min.', 98 | 'string' => 'The :attribute must be at least :min characters.', 99 | ], 100 | 'multiple_of' => 'The :attribute must be a multiple of :value.', 101 | 'not_in' => 'The selected :attribute is invalid.', 102 | 'not_regex' => 'The :attribute format is invalid.', 103 | 'numeric' => 'The :attribute must be a number.', 104 | 'password' => [ 105 | 'letters' => 'The :attribute must contain at least one letter.', 106 | 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', 107 | 'numbers' => 'The :attribute must contain at least one number.', 108 | 'symbols' => 'The :attribute must contain at least one symbol.', 109 | 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', 110 | ], 111 | 'present' => 'The :attribute field must be present.', 112 | 'prohibited' => 'The :attribute field is prohibited.', 113 | 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', 114 | 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', 115 | 'prohibits' => 'The :attribute field prohibits :other from being present.', 116 | 'regex' => 'The :attribute format is invalid.', 117 | 'required' => 'The :attribute field is required.', 118 | 'required_array_keys' => 'The :attribute field must contain entries for: :values.', 119 | 'required_if' => 'The :attribute field is required when :other is :value.', 120 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 121 | 'required_with' => 'The :attribute field is required when :values is present.', 122 | 'required_with_all' => 'The :attribute field is required when :values are present.', 123 | 'required_without' => 'The :attribute field is required when :values is not present.', 124 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 125 | 'same' => 'The :attribute and :other must match.', 126 | 'size' => [ 127 | 'array' => 'The :attribute must contain :size items.', 128 | 'file' => 'The :attribute must be :size kilobytes.', 129 | 'numeric' => 'The :attribute must be :size.', 130 | 'string' => 'The :attribute must be :size characters.', 131 | ], 132 | 'starts_with' => 'The :attribute must start with one of the following: :values.', 133 | 'string' => 'The :attribute must be a string.', 134 | 'timezone' => 'The :attribute must be a valid timezone.', 135 | 'unique' => 'The :attribute has already been taken.', 136 | 'uploaded' => 'The :attribute failed to upload.', 137 | 'url' => 'The :attribute must be a valid URL.', 138 | 'uuid' => 'The :attribute must be a valid UUID.', 139 | 140 | /* 141 | |-------------------------------------------------------------------------- 142 | | Custom Validation Language Lines 143 | |-------------------------------------------------------------------------- 144 | | 145 | | Here you may specify custom validation messages for attributes using the 146 | | convention "attribute.rule" to name the lines. This makes it quick to 147 | | specify a specific custom language line for a given attribute rule. 148 | | 149 | */ 150 | 151 | 'custom' => [ 152 | 'attribute-name' => [ 153 | 'rule-name' => 'custom-message', 154 | ], 155 | ], 156 | 157 | /* 158 | |-------------------------------------------------------------------------- 159 | | Custom Validation Attributes 160 | |-------------------------------------------------------------------------- 161 | | 162 | | The following language lines are used to swap our attribute placeholder 163 | | with something more reader friendly such as "E-Mail Address" instead 164 | | of "email". This simply helps us make our message more expressive. 165 | | 166 | */ 167 | 168 | 'attributes' => [], 169 | 170 | ]; 171 | -------------------------------------------------------------------------------- /lang/tr/validation.php: -------------------------------------------------------------------------------- 1 | ':attribute kabul edildi.', 26 | 'accepted_if' => ':attribute, :other :value olduğunda kabul edilir.', 27 | 'active_url' => ':attribute geçerli bir URL değil.', 28 | 'after' => ':attribute, :date tarihinden sonraki bir tarih olmalıdır.', 29 | 'after_or_equal' => ':attribute, :date değerinden sonraki veya buna eşit bir tarih olmalıdır.', 30 | 'alpha' => ':attribute yalnızca harfler içermelidir.', 31 | 'alpha_dash' => ':attribute yalnızca harf, sayı, tire ve alt çizgi içermelidir.', 32 | 'alpha_num' => ':attribute yalnızca harf ve rakamlardan oluşmalıdır.', 33 | 'array' => ':attribute bir dizi olmalıdır.', 34 | 'before' => ':attribute, :date tarihinden önceki bir tarih olmalıdır.', 35 | 'before_or_equal' => ':attribute, :date tarihinden önce veya buna eşit bir tarih olmalıdır.', 36 | 'between' => [ 37 | 'array' => ':attribute, :min ve :max öğeleri arasında olmalıdır.', 38 | 'file' => ':attribute :min ile :max kilobayt arasında olmalıdır.', 39 | 'numeric' => ':attribute :min ile :max arasında olmalıdır.', 40 | 'string' => ':attribute :min ve :max karakterleri arasında olmalıdır.', 41 | ], 42 | 'boolean' => ':attribute alanı doğru veya yanlış olmalıdır.', 43 | 'confirmed' => ':attribute onayı eşleşmiyor.', 44 | 'current_password' => 'Şifre yanlış.', 45 | 'date' => ':attribute geçerli bir tarih değil.', 46 | 'date_equals' => ':attribute, :date değerine eşit bir tarih olmalıdır.', 47 | 'date_format' => ':attribute, :format biçimiyle eşleşmiyor.', 48 | 'declined' => ':attribute reddedilmelidir.', 49 | 'declined_if' => ':attribute, :other :value olduğunda reddedilmelidir.', 50 | 'different' => ':attribute ve :other farklı olmalıdır.', 51 | 'digits' => ':attribute :digits olmalıdır.', 52 | 'digits_between' => ':attribute :min ve :max basamakları arasında olmalıdır.', 53 | 'dimensions' => ':attribute geçersiz resim boyutlarına sahip.', 54 | 'distinct' => ':attribute alanında yinelenen bir değer var.', 55 | 'doesnt_start_with' => ':attribute aşağıdakilerden biriyle başlamayabilir: :values.', 56 | 'email' => ':attribute geçerli bir e-posta adresi olmalıdır.', 57 | 'ends_with' => ':attribute aşağıdakilerden biriyle bitmelidir: :values.', 58 | 'enum' => 'Seçilen :attribute geçersiz.', 59 | 'exists' => 'Seçilen :attribute geçersiz.', 60 | 'file' => ':attribute bir dosya olmalıdır.', 61 | 'filled' => ':attribute alanı bir değere sahip olmalıdır.', 62 | 'gt' => [ 63 | 'array' => ':attribute, :value öğelerinden daha fazlasına sahip olmalıdır.', 64 | 'file' => ':attribute, :value kilobayttan büyük olmalıdır.', 65 | 'numeric' => ':attribute, :value değerinden büyük olmalıdır.', 66 | 'string' => ':attribute, :value karakterlerinden büyük olmalıdır.', 67 | ], 68 | 'gte' => [ 69 | 'array' => ':attribute, :value öğelerine veya daha fazlasına sahip olmalıdır.', 70 | 'file' => ':attribute, :value kilobayttan büyük veya buna eşit olmalıdır.', 71 | 'numeric' => ':attribute, :value değerinden büyük veya buna eşit olmalıdır.', 72 | 'string' => ':attribute, :value karakterlerinden büyük veya ona eşit olmalıdır.', 73 | ], 74 | 'image' => ':attribute bir resim olmalıdır.', 75 | 'in' => 'Seçilen :attribute geçersiz.', 76 | 'in_array' => ':attribute alanı :other içinde mevcut değil.', 77 | 'integer' => ':attribute bir tamsayı olmalıdır.', 78 | 'ip' => ':attribute geçerli bir IP adresi olmalıdır.', 79 | 'ipv4' => ':attribute geçerli bir IPv4 adresi olmalıdır.', 80 | 'ipv6' => ':attribute geçerli bir IPv6 adresi olmalıdır.', 81 | 'json' => ':attribute geçerli bir JSON dizesi olmalıdır.', 82 | 'lt' => [ 83 | 'array' => ':attribute, :value öğelerinden daha azına sahip olmalıdır.', 84 | 'file' => ':attribute :value kilobayttan küçük olmalıdır.', 85 | 'numeric' => ':attribute :value değerinden küçük olmalıdır.', 86 | 'string' => ':attribute, :value karakterlerinden daha az olmalıdır.', 87 | ], 88 | 'lte' => [ 89 | 'array' => ':attribute, :value öğelerinden daha fazlasına sahip olmamalıdır.', 90 | 'file' => ':attribute, :value kilobayttan küçük veya ona eşit olmalıdır.', 91 | 'numeric' => ':attribute, :value değerinden küçük veya buna eşit olmalıdır.', 92 | 'string' => ':attribute, :value karakterlerinden küçük veya bunlara eşit olmalıdır.', 93 | ], 94 | 'mac_address' => ':attribute geçerli bir MAC adresi olmalıdır.', 95 | 'max' => [ 96 | 'array' => ':attribute öğesi, :max öğelerinden daha fazlasına sahip olmamalıdır.', 97 | 'file' => ':attribute :max kilobayttan büyük olmamalıdır.', 98 | 'numeric' => ':attribute :max değerinden büyük olmamalıdır.', 99 | 'string' => ':attribute :max karakterden büyük olmamalıdır.', 100 | ], 101 | 'mimes' => ':attribute, :values ​​türünde bir dosya olmalıdır.', 102 | 'mimetypes' => ':attribute, :values ​​türünde bir dosya olmalıdır.', 103 | 'min' => [ 104 | 'array' => ':attribute en az :min öğelerine sahip olmalıdır.', 105 | 'file' => ':attribute en az :min kilobayt olmalıdır.', 106 | 'numeric' => ':attribute en az :min olmalıdır.', 107 | 'string' => ':attribute en az :min karakter olmalıdır.', 108 | ], 109 | 'multiple_of' => ':attribute, :value nun katı olmalıdır.', 110 | 'not_in' => 'Seçilen :attribute geçersiz.', 111 | 'not_regex' => ':attribute biçimi geçersiz.', 112 | 'numeric' => ':attribute bir sayı olmalıdır.', 113 | 'password' => [ 114 | 'letters' => ':attribute en az bir harf içermelidir.', 115 | 'mixed' => ':attribute en az bir büyük harf ve bir küçük harf içermelidir.', 116 | 'numbers' => ':attribute en az bir sayı içermelidir.', 117 | 'symbols' => ':attribute en az bir sembol içermelidir.', 118 | 'uncompromised' => 'Verilen :attribute bir veri sızıntısında ortaya çıktı. Lütfen farklı bir :attribute seçin.', 119 | ], 120 | 'present' => ':attribute alanı mevcut olmalıdır.', 121 | 'prohibited' => ':attribute alanı yasaktır.', 122 | 'prohibited_if' => ':attribute alanı :other :value olduğunda yasaktır.', 123 | 'prohibited_unless' => ':attribute alanı, :other :values ​​içinde olmadığı sürece yasaktır.', 124 | 'prohibits' => ':attribute alanı :other in mevcut olmasını yasaklar.', 125 | 'regex' => ':attribute biçimi geçersiz.', 126 | 'required' => ':attribute alanı gereklidir.', 127 | 'required_array_keys' => ':attribute alanı şunlar için girişler içermelidir: :values.', 128 | 'required_if' => ':attribute alanı, :other :value olduğunda gereklidir.', 129 | 'required_unless' => ':attribute alanı, :other :values ​​içinde olmadıkça gereklidir.', 130 | 'required_with' => ':attribute alanı, :values ​​mevcut olduğunda gereklidir.', 131 | 'required_with_all' => ':attribute alanı, :values mevcut olduğunda gereklidir.', 132 | 'required_without' => ':attribute alanı, :values ​​olmadığında gereklidir.', 133 | 'required_without_all' => ':attribute alanı, :values ​​değerlerinin hiçbiri mevcut olmadığında gereklidir.', 134 | 'same' => ':attribute ve :other eşleşmelidir.', 135 | 'size' => [ 136 | 'array' => ':attribute :size öğeleri içermelidir.', 137 | 'file' => ':attribute :size kilobayt olmalıdır.', 138 | 'numeric' => ':attribute :size olmalıdır.', 139 | 'string' => ':attribute :size karakter olmalıdır.', 140 | ], 141 | 'starts_with' => ':attribute aşağıdakilerden biriyle başlamalıdır: :values', 142 | 'string' => ':attribute bir dize olmalıdır.', 143 | 'timezone' => ':attribute geçerli bir saat dilimi olmalıdır.', 144 | 'unique' => ':attribute zaten alınmış.', 145 | 'uploaded' => ':attribute yüklenemedi.', 146 | 'url' => ':attribute geçerli bir URL olmalıdır.', 147 | 'uuid' => ':attribute geçerli bir UUID olmalıdır.', 148 | 149 | /* 150 | |-------------------------------------------------------------------------- 151 | | Özel Doğrulama Dili Satırları 152 | |-------------------------------------------------------------------------- 153 | | 154 | | Burada, öznitelikler için özel doğrulama mesajları belirtebilirsiniz. 155 | | satırları adlandırmak için "attribute.rule" kuralı. Bu, hızlı olmasını sağlar 156 | | belirli bir öznitelik kuralı için belirli bir özel dil satırı belirtin. 157 | | 158 | */ 159 | 160 | 'custom' => [ 161 | 'attribute-name' => [ 162 | 'rule-name' => 'custom-message', 163 | ], 164 | ], 165 | 166 | /* 167 | |-------------------------------------------------------------------------- 168 | | Özel Doğrulama Nitelikleri 169 | |-------------------------------------------------------------------------- 170 | | 171 | | Özellik yer tutucumuzu değiştirmek için aşağıdaki dil satırları kullanılır 172 | | "e-posta". Bu, mesajımızı daha anlamlı hale getirmemize yardımcı olur 173 | | 174 | */ 175 | 176 | 'attributes' => [], 177 | 178 | ]; 179 | -------------------------------------------------------------------------------- /lang/es/validation.php: -------------------------------------------------------------------------------- 1 | 'El :attribute debe ser aceptado.', 17 | 'accepted_if' => 'El :attribute debe ser aceptado cuando :other es :value.', 18 | 'active_url' => 'El :attribute no es una URL válida.', 19 | 'after' => 'El :attribute debe ser una fecha después de :date.', 20 | 'after_or_equal' => 'El :attribute debe ser una fecha posterior o igual a :date.', 21 | 'alpha' => 'El :attribute sólo debe contener letras.', 22 | 'alpha_dash' => 'El :attribute sólo debe contener letras, números, guiones y guiones bajos.', 23 | 'alpha_num' => 'El :attribute sólo debe contener letras y números.', 24 | 'array' => 'El :attribute debe ser una matriz.', 25 | 'before' => 'El :attribute debe ser una fecha anterior a :date.', 26 | 'before_or_equal' => 'El :attribute debe ser una fecha anterior o igual a :date.', 27 | 'between' => [ 28 | 'array' => 'El :attribute debe tener entre :min y :max elementos.', 29 | 'file' => 'El :attribute debe tener entre :min y :max kilobytes.', 30 | 'numeric' => 'El :attribute debe tener entre :min y :max.', 31 | 'string' => 'The :attribute debe tener entre :min y :max carácteres.', 32 | ], 33 | 'boolean' => 'El :attribute el campo debe ser verdadero o falso.', 34 | 'confirmed' => 'El :attribute la confirmación no coincide.', 35 | 'current_password' => 'La contraseña es incorrecta.', 36 | 'date' => 'El :attribute no es una fecha válida.', 37 | 'date_equals' => 'El :attribute debe ser una fecha igual a :date.', 38 | 'date_format' => 'El :attribute no coincide con el formato :format.', 39 | 'declined' => 'El :attribute debe ser rechazado.', 40 | 'declined_if' => 'El :attribute debe rechazarse cuando :other es :value.', 41 | 'different' => 'El :attribute y :other debe ser diferente', 42 | 'digits' => 'El :attribute debe ser :digits dígitos.', 43 | 'digits_between' => 'El :attribute debe estar entre :min y :max dígitos.', 44 | 'dimensions' => 'El :attribute tiene dimensiones de imagen no válidas.', 45 | 'distinct' => 'El :attribute el campo tiene un valor duplicado.', 46 | 'doesnt_start_with' => 'El :attribute no puede comenzar con uno de los siguientes valores: :values.', 47 | 'email' => 'El :attribute debe ser una dirección de correo electrónico válida.', 48 | 'ends_with' => 'El :attribute debe terminar con uno de los siguientes: :values.', 49 | 'enum' => 'La selección :attribute es inválida.', 50 | 'exists' => 'La selección :attribute es inválida.', 51 | 'file' => 'El :attribute debe ser un archivo.', 52 | 'filled' => 'El :attribute el campo debe tener un valor.', 53 | 'gt' => [ 54 | 'array' => 'El :attribute debe tener más de :value elementos.', 55 | 'file' => 'El :attribute debe ser mayor que :value kilobytes.', 56 | 'numeric' => 'El :attribute debe ser mayor a :value.', 57 | 'string' => 'El :attribute debe ser mayor a :value carácteres.', 58 | ], 59 | 'gte' => [ 60 | 'array' => 'El :attribute debe tener :value un elementos o más.', 61 | 'file' => 'El :attribute debe ser mayor o igual a :value kilobytes.', 62 | 'numeric' => 'El :attribute debe ser mayor o igual a :value.', 63 | 'string' => 'El :attribute debe ser mayor o igual a :value carácteres.', 64 | ], 65 | 'image' => 'El :attribute debe ser una imagen.', 66 | 'in' => 'La selección :attribute es inválida.', 67 | 'in_array' => 'El :attribute campo no existe en :other.', 68 | 'integer' => 'El :attribute debe ser un entero.', 69 | 'ip' => 'El :attribute debe ser una dirección IP válida.', 70 | 'ipv4' => 'El :attribute debe ser una IPv4 válida.', 71 | 'ipv6' => 'El :attribute debe ser una IPv6 válida.', 72 | 'json' => 'El :attribute debe ser una cadena JSON válida.', 73 | 'lt' => [ 74 | 'array' => 'El :attribute debe tener menos de :value elementos.', 75 | 'file' => 'El :attribute debe ser menor a :value kilobytes.', 76 | 'numeric' => 'El :attribute debe ser menor a :value.', 77 | 'string' => 'El :attribute debe ser menor a :value carácteres.', 78 | ], 79 | 'lte' => [ 80 | 'array' => 'El :attribute no debe tener más de :value elementos.', 81 | 'file' => 'El :attribute debe ser menor o igual a :value kilobytes.', 82 | 'numeric' => 'El :attribute debe ser menor o igual a :value.', 83 | 'string' => 'El :attribute debe ser menor o igual a :value carácteres.', 84 | ], 85 | 'mac_address' => 'El :attribute debe ser una dirección MAC válida.', 86 | 'max' => [ 87 | 'array' => 'El :attribute no debe tener más de :max elementos.', 88 | 'file' => 'El :attribute no debe ser mayor que :max kilobytes.', 89 | 'numeric' => 'El :attribute no debe ser mayor a :max.', 90 | 'string' => 'El :attribute no debe ser mayor a :max carácteres.', 91 | ], 92 | 'mimes' => 'El :attribute debe ser un archivo de tipo: :values.', 93 | 'mimetypes' => 'El :attribute debe ser un archivo de tipo: :values.', 94 | 'min' => [ 95 | 'array' => 'El :attribute debe tener al menos :min elementos.', 96 | 'file' => 'El :attribute debe ser por lo menos :min kilobytes.', 97 | 'numeric' => 'El :attribute debe ser por lo menos :min.', 98 | 'string' => 'El :attribute debe ser por lo menos :min carácteres.', 99 | ], 100 | 'multiple_of' => 'El :attribute debe ser múltiplo de :value.', 101 | 'not_in' => 'La selección :attribute es inválida.', 102 | 'not_regex' => 'El :attribute el formato no es válido.', 103 | 'numeric' => 'El :attribute debe que ser un número.', 104 | 'password' => [ 105 | 'letters' => 'El :attribute debe contener al menos una letra.', 106 | 'mixed' => 'El :attribute debe contener al menos una letra mayúscula y una minúscula.', 107 | 'numbers' => 'El :attribute debe contener al menos un número.', 108 | 'symbols' => 'El :attribute debe contener al menos un símbolo.', 109 | 'uncompromised' => 'La selección :attribute ha aparecido en una fuga de datos. Por favor, elija un diferente :attribute.', 110 | ], 111 | 'present' => 'El :attribute el campo debe estar presente.', 112 | 'prohibited' => 'El :attribute el campo esta prohíbido.', 113 | 'prohibited_if' => 'El :attribute campo está prohibido cuando :other es :value.', 114 | 'prohibited_unless' => 'El :attribute campo está prohibido a menos que :other está en :values.', 115 | 'prohibits' => 'El :attribute campo prohíbe :other de estar presente.', 116 | 'regex' => 'El:attribute el formato no es válido.', 117 | 'required' => 'El :attribute es requerido.', 118 | 'required_array_keys' => 'El :attribute campo debe contener entradas para: :values.', 119 | 'required_if' => 'El :attribute el campo es obligatorio cuando :other es :value.', 120 | 'required_unless' => 'El :attribute el campo es obligatorio a menos que :other está en :values.', 121 | 'required_with' => 'El :attribute el campo es obligatorio cuando :values esté presente.', 122 | 'required_with_all' => 'El :attribute el campo es obligatorio cuando :values está presente.', 123 | 'required_without' => 'El :attribute el campo es requerido cuando :values no está presente.', 124 | 'required_without_all' => 'El :attribute el campo es requerido cuando ninguno de estos :values está presente.', 125 | 'same' => 'El :attribute y :other deben coincidir.', 126 | 'size' => [ 127 | 'array' => 'El :attribute debe contener :size elementos.', 128 | 'file' => 'El :attribute debe ser :size kilobytes.', 129 | 'numeric' => 'El :attribute debe ser :size.', 130 | 'string' => 'El :attribute debe ser :size carácteres.', 131 | ], 132 | 'starts_with' => 'El :attribute debe comenzar con uno de los siguientes: :values.', 133 | 'string' => 'El :attribute mdebe ser una cadena (string).', 134 | 'timezone' => 'El :attribute debe ser una zona horaria válida.', 135 | 'unique' => 'El :attribute ya existe.', 136 | 'uploaded' => 'El :attribute no se pudo cargar.', 137 | 'url' => 'El :attribute debe ser una URL válida.', 138 | 'uuid' => 'El :attribute debe ser un UUID válido.', 139 | 140 | /* 141 | |-------------------------------------------------------------------------- 142 | | Custom Validation Language Lines 143 | |-------------------------------------------------------------------------- 144 | | 145 | | Here you may specify custom validation messages for attributes using the 146 | | convention "attribute.rule" to name the lines. This makes it quick to 147 | | specify a specific custom language line for a given attribute rule. 148 | | 149 | */ 150 | 151 | 'custom' => [ 152 | 'attribute-name' => [ 153 | 'rule-name' => 'custom-message', 154 | ], 155 | ], 156 | 157 | /* 158 | |-------------------------------------------------------------------------- 159 | | Custom Validation Attributes 160 | |-------------------------------------------------------------------------- 161 | | 162 | | The following language lines are used to swap our attribute placeholder 163 | | with something more reader friendly such as "E-Mail Address" instead 164 | | of "email". This simply helps us make our message more expressive. 165 | | 166 | */ 167 | 168 | 'attributes' => [], 169 | 170 | ]; 171 | -------------------------------------------------------------------------------- /config/ide-helper.php: -------------------------------------------------------------------------------- 1 | '_ide_helper.php', 18 | 19 | /* 20 | |-------------------------------------------------------------------------- 21 | | Where to write the PhpStorm specific meta file 22 | |-------------------------------------------------------------------------- 23 | | 24 | | PhpStorm also supports the directory `.phpstorm.meta.php/` with arbitrary 25 | | files in it, should you need additional files for your project; e.g. 26 | | `.phpstorm.meta.php/laravel_ide_Helper.php'. 27 | | 28 | */ 29 | 'meta_filename' => '.phpstorm.meta.php', 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Fluent helpers 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Set to true to generate commonly used Fluent methods 37 | | 38 | */ 39 | 40 | 'include_fluent' => true, 41 | 42 | /* 43 | |-------------------------------------------------------------------------- 44 | | Factory Builders 45 | |-------------------------------------------------------------------------- 46 | | 47 | | Set to true to generate factory generators for better factory() 48 | | method auto-completion. 49 | | 50 | | Deprecated for Laravel 8 or latest. 51 | | 52 | */ 53 | 54 | 'include_factory_builders' => false, 55 | 56 | /* 57 | |-------------------------------------------------------------------------- 58 | | Write Model Magic methods 59 | |-------------------------------------------------------------------------- 60 | | 61 | | Set to false to disable write magic methods of model 62 | | 63 | */ 64 | 65 | 'write_model_magic_where' => true, 66 | 67 | /* 68 | |-------------------------------------------------------------------------- 69 | | Write Model External Eloquent Builder methods 70 | |-------------------------------------------------------------------------- 71 | | 72 | | Set to false to disable write external eloquent builder methods 73 | | 74 | */ 75 | 76 | 'write_model_external_builder_methods' => true, 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Write Model relation count properties 81 | |-------------------------------------------------------------------------- 82 | | 83 | | Set to false to disable writing of relation count properties to model DocBlocks. 84 | | 85 | */ 86 | 87 | 'write_model_relation_count_properties' => true, 88 | 89 | /* 90 | |-------------------------------------------------------------------------- 91 | | Write Eloquent Model Mixins 92 | |-------------------------------------------------------------------------- 93 | | 94 | | This will add the necessary DocBlock mixins to the model class 95 | | contained in the Laravel Framework. This helps the IDE with 96 | | auto-completion. 97 | | 98 | | Please be aware that this setting changes a file within the /vendor directory. 99 | | 100 | */ 101 | 102 | 'write_eloquent_model_mixins' => true, 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Helper files to include 107 | |-------------------------------------------------------------------------- 108 | | 109 | | Include helper files. By default not included, but can be toggled with the 110 | | -- helpers (-H) option. Extra helper files can be included. 111 | | 112 | */ 113 | 114 | 'include_helpers' => true, 115 | 116 | 'helper_files' => [ 117 | base_path() . '/vendor/laravel/framework/src/Illuminate/Support/helpers.php', 118 | ], 119 | 120 | /* 121 | |-------------------------------------------------------------------------- 122 | | Model locations to include 123 | |-------------------------------------------------------------------------- 124 | | 125 | | Define in which directories the ide-helper:models command should look 126 | | for models. 127 | | 128 | | glob patterns are supported to easier reach models in sub-directories, 129 | | e.g. `app/Services/* /Models` (without the space) 130 | | 131 | */ 132 | 133 | 'model_locations' => [ 134 | 'app', 135 | ], 136 | 137 | /* 138 | |-------------------------------------------------------------------------- 139 | | Models to ignore 140 | |-------------------------------------------------------------------------- 141 | | 142 | | Define which models should be ignored. 143 | | 144 | */ 145 | 146 | 'ignored_models' => [ 147 | 148 | ], 149 | 150 | /* 151 | |-------------------------------------------------------------------------- 152 | | Extra classes 153 | |-------------------------------------------------------------------------- 154 | | 155 | | These implementations are not really extended, but called with magic functions 156 | | 157 | */ 158 | 159 | 'extra' => [ 160 | 'Eloquent' => [Builder::class, \Illuminate\Database\Query\Builder::class], 161 | 'Session' => [Store::class], 162 | ], 163 | 164 | 'magic' => [], 165 | 166 | /* 167 | |-------------------------------------------------------------------------- 168 | | Interface implementations 169 | |-------------------------------------------------------------------------- 170 | | 171 | | These interfaces will be replaced with the implementing class. Some interfaces 172 | | are detected by the helpers, others can be listed below. 173 | | 174 | */ 175 | 176 | 'interfaces' => [ 177 | 178 | ], 179 | 180 | /* 181 | |-------------------------------------------------------------------------- 182 | | Support for custom DB types 183 | |-------------------------------------------------------------------------- 184 | | 185 | | This setting allow you to map any custom database type (that you may have 186 | | created using CREATE TYPE statement or imported using database plugin 187 | | / extension to a Doctrine type. 188 | | 189 | | Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are: 190 | | 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql' 191 | | 192 | | This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant 193 | | 194 | | The value of the array is an array of type mappings. Key is the name of the custom type, 195 | | (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in 196 | | our case it is 'json_array'. Doctrine types are listed here: 197 | | http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html 198 | | 199 | | So to support jsonb in your models when working with Postgres, just add the following entry to the array below: 200 | | 201 | | "postgresql" => array( 202 | | "jsonb" => "json_array", 203 | | ), 204 | | 205 | */ 206 | 'custom_db_types' => [ 207 | 208 | ], 209 | 210 | /* 211 | |-------------------------------------------------------------------------- 212 | | Support for camel cased models 213 | |-------------------------------------------------------------------------- 214 | | 215 | | There are some Laravel packages (such as Eloquence) that allow for accessing 216 | | Eloquent model properties via camel case, instead of snake case. 217 | | 218 | | Enabling this option will support these packages by saving all model 219 | | properties as camel case, instead of snake case. 220 | | 221 | | For example, normally you would see this: 222 | | 223 | | * @property \Illuminate\Support\Carbon $created_at 224 | | * @property \Illuminate\Support\Carbon $updated_at 225 | | 226 | | With this enabled, the properties will be this: 227 | | 228 | | * @property \Illuminate\Support\Carbon $createdAt 229 | | * @property \Illuminate\Support\Carbon $updatedAt 230 | | 231 | | Note, it is currently an all-or-nothing option. 232 | | 233 | */ 234 | 'model_camel_case_properties' => false, 235 | 236 | /* 237 | |-------------------------------------------------------------------------- 238 | | Property Casts 239 | |-------------------------------------------------------------------------- 240 | | 241 | | Cast the given "real type" to the given "type". 242 | | 243 | */ 244 | 'type_overrides' => [ 245 | 'integer' => 'int', 246 | 'boolean' => 'bool', 247 | ], 248 | 249 | /* 250 | |-------------------------------------------------------------------------- 251 | | Include DocBlocks from classes 252 | |-------------------------------------------------------------------------- 253 | | 254 | | Include DocBlocks from classes to allow additional code inspection for 255 | | magic methods and properties. 256 | | 257 | */ 258 | 'include_class_docblocks' => true, 259 | 260 | /* 261 | |-------------------------------------------------------------------------- 262 | | Force FQN usage 263 | |-------------------------------------------------------------------------- 264 | | 265 | | Use the fully qualified (class) name in docBlock, 266 | | event if class exists in a given file 267 | | or there is an import (use className) of a given class 268 | | 269 | */ 270 | 'force_fqn' => false, 271 | 272 | /* 273 | |-------------------------------------------------------------------------- 274 | | Additional relation types 275 | |-------------------------------------------------------------------------- 276 | | 277 | | Sometimes it's needed to create custom relation types. The key of the array 278 | | is the Relationship Method name. The value of the array is the canonical class 279 | | name of the Relationship, e.g. `'relationName' => RelationShipClass::class`. 280 | | 281 | */ 282 | 'additional_relation_types' => [], 283 | 284 | ]; 285 | --------------------------------------------------------------------------------