├── .docker ├── nginx-laravel.conf ├── nginx.conf ├── php-fpm.conf ├── php.ini-production └── supervisord.ini ├── .editorconfig ├── .env.example ├── .env.original ├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ └── docker-publish.yml ├── .gitignore ├── .styleci.yml ├── Dockerfile ├── README.md ├── app ├── Console │ ├── Commands │ │ └── InitCommand.php │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Filament │ ├── Resources │ │ ├── Channel │ │ │ └── RelationManagers │ │ │ │ └── PackageRelationManager.php │ │ ├── ChannelResource.php │ │ ├── ChannelResource │ │ │ └── Pages │ │ │ │ ├── CreateChannel.php │ │ │ │ ├── EditChannel.php │ │ │ │ ├── ListChannels.php │ │ │ │ └── SortChannels.php │ │ ├── ClientResource.php │ │ ├── ClientResource │ │ │ └── Pages │ │ │ │ ├── CreateClient.php │ │ │ │ ├── EditClient.php │ │ │ │ └── ListClients.php │ │ ├── CustomerResource │ │ │ └── Pages │ │ │ │ └── SortCustomers.php │ │ ├── PackageResource.php │ │ └── PackageResource │ │ │ └── Pages │ │ │ ├── CreatePackage.php │ │ │ ├── EditPackage.php │ │ │ └── ListPackages.php │ ├── Tables │ │ └── Columns │ │ │ └── ShortUrl.php │ └── Widgets │ │ └── UpdateBackend.php ├── Http │ ├── Controllers │ │ ├── Api │ │ │ └── TokensController.php │ │ ├── Controller.php │ │ └── Public │ │ │ ├── ChannelsListController.php │ │ │ └── GetChannelController.php │ ├── Kernel.php │ └── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php ├── Models │ ├── Channel.php │ ├── ChannelsPackage.php │ ├── Client.php │ ├── Package.php │ └── User.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php └── Service │ └── NatsService.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filament.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── sanctum.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ ├── 2021_11_18_180649_initial_db_migration.php │ └── 2021_11_21_205049_add_ch_to_clients_table.php └── seeders │ ├── DatabaseSeeder.php │ └── DefaultUserSeeder.php ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── favicon.ico ├── index.php ├── robots.txt └── web.config ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── empty.blade.php │ ├── filament │ ├── resources │ │ └── channel-resource │ │ │ └── pages │ │ │ └── sort-channels.blade.php │ ├── tables │ │ └── cells │ │ │ └── short-url.blade.php │ └── widgets │ │ └── update-backend.blade.php │ ├── vendor │ ├── filament │ │ ├── auth │ │ │ ├── login.blade.php │ │ │ ├── logout.blade.php │ │ │ ├── register.blade.php │ │ │ ├── request-password.blade.php │ │ │ └── reset-password.blade.php │ │ ├── components │ │ │ ├── app-content.blade.php │ │ │ ├── app-header.blade.php │ │ │ ├── avatar.blade.php │ │ │ ├── branding │ │ │ │ ├── app.blade.php │ │ │ │ ├── auth.blade.php │ │ │ │ └── footer.blade.php │ │ │ ├── button.blade.php │ │ │ ├── card-header.blade.php │ │ │ ├── card.blade.php │ │ │ ├── dropdown-link.blade.php │ │ │ ├── dropdown.blade.php │ │ │ ├── image.blade.php │ │ │ ├── layouts │ │ │ │ ├── app.blade.php │ │ │ │ ├── auth.blade.php │ │ │ │ └── base.blade.php │ │ │ ├── loader.blade.php │ │ │ ├── logo.blade.php │ │ │ ├── modal.blade.php │ │ │ ├── nav-link.blade.php │ │ │ ├── nav.blade.php │ │ │ ├── notification.blade.php │ │ │ ├── resources │ │ │ │ ├── forms │ │ │ │ │ └── actions.blade.php │ │ │ │ └── relations.blade.php │ │ │ └── widget.blade.php │ │ ├── dashboard.blade.php │ │ ├── edit-account.blade.php │ │ ├── relation-manager.blade.php │ │ └── resources │ │ │ ├── pages │ │ │ ├── .list-records.blade.php.swp │ │ │ ├── create-record.blade.php │ │ │ ├── edit-record.blade.php │ │ │ └── list-records.blade.php │ │ │ └── relation-manager │ │ │ ├── attach-record.blade.php │ │ │ ├── create-record.blade.php │ │ │ ├── edit-record.blade.php │ │ │ └── list-records.blade.php │ └── tables │ │ ├── cells │ │ ├── boolean.blade.php │ │ ├── icon.blade.php │ │ ├── image.blade.php │ │ └── text.blade.php │ │ ├── components │ │ ├── delete-selected.blade.php │ │ ├── filter.blade.php │ │ ├── pagination │ │ │ ├── paginator.blade.php │ │ │ └── records-per-page-selector.blade.php │ │ └── table.blade.php │ │ └── record-actions │ │ ├── icon.blade.php │ │ └── link.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── debugbar │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.docker/nginx-laravel.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80 default_server; 3 | server_name _; 4 | root /var/www/html/public; 5 | 6 | add_header X-Frame-Options "SAMEORIGIN"; 7 | add_header X-Content-Type-Options "nosniff"; 8 | 9 | index index.php; 10 | 11 | charset utf-8; 12 | 13 | location / { 14 | try_files $uri $uri/ /index.php?$query_string; 15 | } 16 | 17 | location = /favicon.ico { access_log off; log_not_found off; } 18 | location = /robots.txt { access_log off; log_not_found off; } 19 | 20 | error_page 404 /index.php; 21 | 22 | location ~ \.php$ { 23 | fastcgi_pass localhost:9000; 24 | fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; 25 | include fastcgi_params; 26 | } 27 | 28 | location ~ /\.(?!well-known).* { 29 | deny all; 30 | } 31 | 32 | set_real_ip_from 0.0.0.0/0; # Ip/network of the reverse proxy (or ip received into REMOTE_ADDR) 33 | real_ip_header X-Real-IP; 34 | } 35 | -------------------------------------------------------------------------------- /.docker/nginx.conf: -------------------------------------------------------------------------------- 1 | # /etc/nginx/nginx.conf 2 | 3 | user nobody; 4 | 5 | # NGINX will run in the foreground 6 | daemon off; 7 | 8 | # Set number of worker processes automatically based on number of CPU cores. 9 | worker_processes auto; 10 | 11 | # Enables the use of JIT for regular expressions to speed-up their processing. 12 | pcre_jit on; 13 | 14 | # Configures default error logger. 15 | error_log /var/log/nginx/error.log warn; 16 | 17 | # Uncomment to include files with config snippets into the root context. 18 | # NOTE: This will be enabled by default in Alpine 3.15. 19 | # include /etc/nginx/conf.d/*.conf; 20 | 21 | 22 | events { 23 | # The maximum number of simultaneous connections that can be opened by 24 | # a worker process. 25 | worker_connections 1024; 26 | } 27 | 28 | http { 29 | # Includes mapping of file name extensions to MIME types of responses 30 | # and defines the default type. 31 | include /etc/nginx/mime.types; 32 | default_type application/octet-stream; 33 | 34 | # Includes files with directives to load dynamic modules. 35 | include /etc/nginx/modules/*.conf; 36 | 37 | # Name servers used to resolve names of upstream servers into addresses. 38 | # It's also needed when using tcpsocket and udpsocket in Lua modules. 39 | #resolver 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001; 40 | 41 | # Don't tell nginx version to the clients. Default is 'on'. 42 | server_tokens off; 43 | 44 | # Specifies the maximum accepted body size of a client request, as 45 | # indicated by the request header Content-Length. If the stated content 46 | # length is greater than this size, then the client receives the HTTP 47 | # error code 413. Set to 0 to disable. Default is '1m'. 48 | client_max_body_size 1m; 49 | 50 | # Sendfile copies data between one FD and other from within the kernel, 51 | # which is more efficient than read() + write(). Default is off. 52 | sendfile on; 53 | 54 | # Causes nginx to attempt to send its HTTP response head in one packet, 55 | # instead of using partial frames. Default is 'off'. 56 | tcp_nopush on; 57 | 58 | 59 | # Enables the specified protocols. Default is TLSv1 TLSv1.1 TLSv1.2. 60 | # TIP: If you're not obligated to support ancient clients, remove TLSv1.1. 61 | ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; 62 | 63 | # Path of the file with Diffie-Hellman parameters for EDH ciphers. 64 | # TIP: Generate with: `openssl dhparam -out /etc/ssl/nginx/dh2048.pem 2048` 65 | #ssl_dhparam /etc/ssl/nginx/dh2048.pem; 66 | 67 | # Specifies that our cipher suits should be preferred over client ciphers. 68 | # Default is 'off'. 69 | ssl_prefer_server_ciphers on; 70 | 71 | # Enables a shared SSL cache with size that can hold around 8000 sessions. 72 | # Default is 'none'. 73 | ssl_session_cache shared:SSL:2m; 74 | 75 | # Specifies a time during which a client may reuse the session parameters. 76 | # Default is '5m'. 77 | ssl_session_timeout 1h; 78 | 79 | # Disable TLS session tickets (they are insecure). Default is 'on'. 80 | ssl_session_tickets off; 81 | 82 | 83 | # Enable gzipping of responses. 84 | #gzip on; 85 | 86 | # Set the Vary HTTP header as defined in the RFC 2616. Default is 'off'. 87 | gzip_vary on; 88 | 89 | 90 | # Helper variable for proxying websockets. 91 | map $http_upgrade $connection_upgrade { 92 | default upgrade; 93 | '' close; 94 | } 95 | 96 | 97 | # Specifies the main log format. 98 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 99 | '$status $body_bytes_sent "$http_referer" ' 100 | '"$http_user_agent" "$http_x_forwarded_for"'; 101 | 102 | # Sets the path, format, and configuration for a buffered log write. 103 | access_log /var/log/nginx/access.log main; 104 | 105 | 106 | # Includes virtual hosts configs. 107 | include /etc/nginx/http.d/*.conf; 108 | } 109 | 110 | # TIP: Uncomment if you use stream module. 111 | #include /etc/nginx/stream.conf; 112 | -------------------------------------------------------------------------------- /.docker/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;; 2 | ; FPM Configuration ; 3 | ;;;;;;;;;;;;;;;;;;;;; 4 | 5 | ; All relative paths in this configuration file are relative to PHP's install 6 | ; prefix (/usr). This prefix can be dynamically changed by using the 7 | ; '-p' argument from the command line. 8 | 9 | ;;;;;;;;;;;;;;;;;; 10 | ; Global Options ; 11 | ;;;;;;;;;;;;;;;;;; 12 | 13 | [global] 14 | ; Pid file 15 | ; Note: the default prefix is /var 16 | ; Default Value: none 17 | pid = /run/php/php8.0-fpm.pid 18 | 19 | ; Error log file 20 | ; If it's set to "syslog", log is sent to syslogd instead of being written 21 | ; in a local file. 22 | ; Note: the default prefix is /var 23 | ; Default Value: log/php-fpm.log 24 | error_log = /proc/self/fd/2 25 | 26 | ; syslog_facility is used to specify what type of program is logging the 27 | ; message. This lets syslogd specify that messages from different facilities 28 | ; will be handled differently. 29 | ; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON) 30 | ; Default Value: daemon 31 | ;syslog.facility = daemon 32 | 33 | ; syslog_ident is prepended to every message. If you have multiple FPM 34 | ; instances running on the same server, you can change the default value 35 | ; which must suit common needs. 36 | ; Default Value: php-fpm 37 | ;syslog.ident = php-fpm 38 | 39 | ; Log level 40 | ; Possible Values: alert, error, warning, notice, debug 41 | ; Default Value: notice 42 | ;log_level = notice 43 | 44 | ; If this number of child processes exit with SIGSEGV or SIGBUS within the time 45 | ; interval set by emergency_restart_interval then FPM will restart. A value 46 | ; of '0' means 'Off'. 47 | ; Default Value: 0 48 | ;emergency_restart_threshold = 0 49 | 50 | ; Interval of time used by emergency_restart_interval to determine when 51 | ; a graceful restart will be initiated. This can be useful to work around 52 | ; accidental corruptions in an accelerator's shared memory. 53 | ; Available Units: s(econds), m(inutes), h(ours), or d(ays) 54 | ; Default Unit: seconds 55 | ; Default Value: 0 56 | ;emergency_restart_interval = 0 57 | 58 | ; Time limit for child processes to wait for a reaction on signals from master. 59 | ; Available units: s(econds), m(inutes), h(ours), or d(ays) 60 | ; Default Unit: seconds 61 | ; Default Value: 0 62 | ;process_control_timeout = 0 63 | 64 | ; The maximum number of processes FPM will fork. This has been design to control 65 | ; the global number of processes when using dynamic PM within a lot of pools. 66 | ; Use it with caution. 67 | ; Note: A value of 0 indicates no limit 68 | ; Default Value: 0 69 | ; process.max = 128 70 | 71 | ; Specify the nice(2) priority to apply to the master process (only if set) 72 | ; The value can vary from -19 (highest priority) to 20 (lower priority) 73 | ; Note: - It will only work if the FPM master process is launched as root 74 | ; - The pool process will inherit the master process priority 75 | ; unless it specified otherwise 76 | ; Default Value: no set 77 | ; process.priority = -19 78 | 79 | ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. 80 | ; Default Value: yes 81 | daemonize = no 82 | 83 | ; Set open file descriptor rlimit for the master process. 84 | ; Default Value: system defined value 85 | ;rlimit_files = 1024 86 | 87 | ; Set max core size rlimit for the master process. 88 | ; Possible Values: 'unlimited' or an integer greater or equal to 0 89 | ; Default Value: system defined value 90 | ;rlimit_core = 0 91 | 92 | ; Specify the event mechanism FPM will use. The following is available: 93 | ; - select (any POSIX os) 94 | ; - poll (any POSIX os) 95 | ; - epoll (linux >= 2.5.44) 96 | ; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0) 97 | ; - /dev/poll (Solaris >= 7) 98 | ; - port (Solaris >= 10) 99 | ; Default Value: not set (auto detection) 100 | ;events.mechanism = epoll 101 | 102 | ; When FPM is build with systemd integration, specify the interval, 103 | ; in second, between health report notification to systemd. 104 | ; Set to 0 to disable. 105 | ; Available Units: s(econds), m(inutes), h(ours) 106 | ; Default Unit: seconds 107 | ; Default value: 10 108 | ;systemd_interval = 10 109 | 110 | ;;;;;;;;;;;;;;;;;;;; 111 | ; Pool Definitions ; 112 | ;;;;;;;;;;;;;;;;;;;; 113 | 114 | ; Multiple pools of child processes may be started with different listening 115 | ; ports and different management options. The name of the pool will be 116 | ; used in logs and stats. There is no limitation on the number of pools which 117 | ; FPM can handle. Your system will tell you anyway :) 118 | 119 | ; Include one or more files. If glob(3) exists, it is used to include a bunch of 120 | ; files from a glob(3) pattern. This directive can be used everywhere in the 121 | ; file. 122 | ; Relative path can also be used. They will be prefixed by: 123 | ; - the global prefix if it's been set (-p argument) 124 | ; - /usr otherwise 125 | include=/etc/php8/php-fpm.d/*.conf 126 | -------------------------------------------------------------------------------- /.docker/supervisord.ini: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | 4 | [program:nginx] 5 | command=nginx 6 | stdout_logfile=/dev/stdout 7 | stdout_logfile_maxbytes=0 8 | stderr_logfile=/dev/stdout 9 | stderr_logfile_maxbytes=0 10 | 11 | [program:php-fpm] 12 | command=php-fpm8 13 | stdout_logfile=/dev/stdout 14 | stdout_logfile_maxbytes=0 15 | stderr_logfile=/dev/stdout 16 | stderr_logfile_maxbytes=0 17 | 18 | [program:laravelmagick] 19 | command = su -c "php artisan sriptv:init" nobody -s /bin/sh 20 | startsecs = 0 21 | autorestart = false 22 | startretries = 1 23 | stdout_logfile=/dev/stdout 24 | stdout_logfile_maxbytes=0 25 | stderr_logfile=/dev/stdout 26 | stderr_logfile_maxbytes=0 27 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=SRIPTV 2 | APP_ENV=production 3 | APP_KEY= 4 | APP_DEBUG=false 5 | APP_URL=http://127.0.0.1:8000 6 | APP_PORT=80 7 | 8 | LOG_CHANNEL=stdout 9 | LOG_DEPRECATIONS_CHANNEL=null 10 | LOG_LEVEL=debug 11 | 12 | DB_CONNECTION=sqlite 13 | DB_DATABASE=/data/database.sqlite 14 | 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | FILESYSTEM_DRIVER=local 19 | QUEUE_CONNECTION=sync 20 | SESSION_DRIVER=file 21 | SESSION_LIFETIME=120 22 | 23 | MEMCACHED_HOST=memcached 24 | 25 | MAIL_MAILER=smtp 26 | MAIL_HOST=mailhog 27 | MAIL_PORT=1025 28 | MAIL_USERNAME=null 29 | MAIL_PASSWORD=null 30 | MAIL_ENCRYPTION=null 31 | MAIL_FROM_ADDRESS=null 32 | MAIL_FROM_NAME="${APP_NAME}" 33 | 34 | ADMIN_EMAIL=admin@admin.tld 35 | ADMIN_PASSWORD=admin123 36 | 37 | NATS_TOPIC=super-config 38 | NATS_PROXY=http://sr-nats-proxy 39 | 40 | VIDEO_GATEWAY=http://video-gateway/reload -------------------------------------------------------------------------------- /.env.original: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 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=mysql 12 | DB_HOST=127.0.0.1 13 | DB_PORT=3306 14 | DB_DATABASE=vms2 15 | DB_USERNAME=root 16 | DB_PASSWORD= 17 | 18 | BROADCAST_DRIVER=log 19 | CACHE_DRIVER=file 20 | FILESYSTEM_DRIVER=local 21 | QUEUE_CONNECTION=sync 22 | SESSION_DRIVER=file 23 | SESSION_LIFETIME=120 24 | 25 | MEMCACHED_HOST=127.0.0.1 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_MAILER=smtp 32 | MAIL_HOST=mailhog 33 | MAIL_PORT=1025 34 | MAIL_USERNAME=null 35 | MAIL_PASSWORD=null 36 | MAIL_ENCRYPTION=null 37 | MAIL_FROM_ADDRESS=null 38 | MAIL_FROM_NAME="${APP_NAME}" 39 | 40 | AWS_ACCESS_KEY_ID= 41 | AWS_SECRET_ACCESS_KEY= 42 | AWS_DEFAULT_REGION=us-east-1 43 | AWS_BUCKET= 44 | AWS_USE_PATH_STYLE_ENDPOINT=false 45 | 46 | PUSHER_APP_ID= 47 | PUSHER_APP_KEY= 48 | PUSHER_APP_SECRET= 49 | PUSHER_APP_CLUSTER=mt1 50 | 51 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 52 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 53 | 54 | ADMIN_EMAIL=admin@admin.tld 55 | ADMIN_EMAIL=demo123 56 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [ blinkinglight ] 2 | -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Docker 2 | 3 | # This workflow uses actions that are not certified by GitHub. 4 | # They are provided by a third-party and are governed by 5 | # separate terms of service, privacy policy, and support 6 | # documentation. 7 | 8 | on: 9 | schedule: 10 | - cron: '41 16 * * *' 11 | push: 12 | branches: [ main ] 13 | # Publish semver tags as releases. 14 | tags: [ 'v*.*.*' ] 15 | pull_request: 16 | branches: [ main ] 17 | 18 | env: 19 | # Use docker.io for Docker Hub if empty 20 | REGISTRY: ghcr.io 21 | # github.repository as / 22 | IMAGE_NAME: ${{ github.repository }} 23 | 24 | 25 | jobs: 26 | build: 27 | 28 | runs-on: ubuntu-latest 29 | permissions: 30 | contents: read 31 | packages: write 32 | 33 | steps: 34 | - name: Checkout repository 35 | uses: actions/checkout@v2 36 | 37 | # Login against a Docker registry except on PR 38 | # https://github.com/docker/login-action 39 | - name: Log into registry ${{ env.REGISTRY }} 40 | if: github.event_name != 'pull_request' 41 | uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c 42 | with: 43 | registry: ${{ env.REGISTRY }} 44 | username: ${{ github.actor }} 45 | password: ${{ secrets.GITHUB_TOKEN }} 46 | 47 | # Extract metadata (tags, labels) for Docker 48 | # https://github.com/docker/metadata-action 49 | - name: Extract Docker metadata 50 | id: meta 51 | uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 52 | with: 53 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 54 | 55 | # Build and push Docker image with Buildx (don't push on PR) 56 | # https://github.com/docker/build-push-action 57 | - name: Build and push Docker image 58 | uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc 59 | with: 60 | context: . 61 | push: ${{ github.event_name != 'pull_request' }} 62 | tags: ${{ steps.meta.outputs.tags }} 63 | labels: ${{ steps.meta.outputs.labels }} 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env 7 | .env.backup 8 | .phpunit.result.cache 9 | docker-compose.override.yml 10 | Homestead.json 11 | Homestead.yaml 12 | npm-debug.log 13 | yarn-error.log 14 | /.idea 15 | /.vscode 16 | *.sqlite 17 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | version: 8 4 | disabled: 5 | - no_unused_imports 6 | finder: 7 | not-name: 8 | - index.php 9 | - server.php 10 | js: 11 | finder: 12 | not-name: 13 | - webpack.mix.js 14 | css: true 15 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:latest 2 | 3 | WORKDIR /var/www/html/ 4 | 5 | RUN echo "UTC" > /etc/timezone 6 | RUN apk add --no-cache zip unzip curl sqlite nginx supervisor 7 | 8 | RUN apk add bash 9 | RUN sed -i 's/bin\/ash/bin\/bash/g' /etc/passwd 10 | 11 | RUN apk add --no-cache php8 \ 12 | php8-common \ 13 | php8-fpm \ 14 | php8-pdo \ 15 | php8-opcache \ 16 | php8-zip \ 17 | php8-phar \ 18 | php8-iconv \ 19 | php8-cli \ 20 | php8-curl \ 21 | php8-openssl \ 22 | php8-mbstring \ 23 | php8-tokenizer \ 24 | php8-fileinfo \ 25 | php8-json \ 26 | php8-xml \ 27 | php8-xmlwriter \ 28 | php8-simplexml \ 29 | php8-dom \ 30 | php8-pdo_mysql \ 31 | php8-pdo_sqlite \ 32 | php8-tokenizer \ 33 | php8-pecl-redis 34 | 35 | 36 | RUN ln -s /usr/bin/php8 /usr/bin/php 37 | 38 | COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer 39 | 40 | RUN mkdir -p /etc/supervisor.d/ 41 | COPY .docker/supervisord.ini /etc/supervisor.d/supervisord.ini 42 | 43 | RUN mkdir -p /run/php/ 44 | RUN touch /run/php/php8.0-fpm.pid 45 | 46 | COPY .docker/php-fpm.conf /etc/php8/php-fpm.conf 47 | COPY .docker/php.ini-production /etc/php8/php.ini 48 | 49 | COPY .docker/nginx.conf /etc/nginx/ 50 | COPY .docker/nginx-laravel.conf /etc/nginx/modules/ 51 | 52 | RUN rm -f /etc/nginx/http.d/default.conf 53 | 54 | RUN mkdir -p /run/nginx/ 55 | RUN touch /run/nginx/nginx.pid 56 | 57 | RUN ln -sf /dev/stdout /var/log/nginx/access.log 58 | RUN ln -sf /dev/stderr /var/log/nginx/error.log 59 | 60 | COPY . . 61 | RUN composer install --no-dev 62 | 63 | RUN composer install \ 64 | --ignore-platform-reqs \ 65 | --no-interaction \ 66 | --no-plugins \ 67 | --no-scripts \ 68 | --prefer-dist \ 69 | --no-dev 70 | 71 | RUN chown -R nobody:nobody /var/www/html/storage 72 | 73 | RUN mkdir /data 74 | RUN chown nobody:nobody /data 75 | 76 | VOLUME /data 77 | 78 | EXPOSE 80 79 | 80 | CMD ["supervisord", "-c", "/etc/supervisor.d/supervisord.ini"] 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenSource IPTV 2 | 3 | 4 | copy .env.example to .env and edit to your environment and edit by your needs 5 | 6 | ``` 7 | composer install --no-dev 8 | php artisan sriptv:init 9 | php artisan serve 10 | ``` 11 | 12 | ## Docker 13 | 14 | build: 15 | 16 | ``` 17 | docker build . -t sr-admin-gui 18 | ``` 19 | 20 | run: 21 | 22 | ``` 23 | docker run -it -p 8080:80 -v data:/data -v "$(pwd)"/.env:/var/www/html/.env:z sr-admin-gui 24 | ``` 25 | 26 | or, if you want to get pre-built package, please use: 27 | 28 | ``` 29 | docker pull ghcr.io/streamingriver/sr-admin-gui:latest 30 | ``` 31 | -------------------------------------------------------------------------------- /app/Console/Commands/InitCommand.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | reportable(function (Throwable $e) { 38 | // 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Filament/Resources/Channel/RelationManagers/PackageRelationManager.php: -------------------------------------------------------------------------------- 1 | schema([ 22 | Components\TextInput::make("name"), 23 | ]); 24 | } 25 | 26 | public static function table(Table $table) 27 | { 28 | return $table 29 | ->columns([ 30 | Columns\Text::make("name"), 31 | ]) 32 | ->filters([ 33 | // 34 | ]); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Filament/Resources/ChannelResource.php: -------------------------------------------------------------------------------- 1 | schema([ 26 | Components\TextInput::make("uuid")->default(Uuid::uuid4())->disabled(), 27 | Components\TextInput::make("name")->required(), 28 | Components\TextInput::make("stream_url")->required(), 29 | Components\Select::make("ffmpeg")->options([ 30 | '0' => 'Disabled', 31 | '1' => 'Enabled', 32 | ])->label("Use ffmpeg for stream_url")->default(1), 33 | Components\Select::make("active")->options([ 34 | '0' => 'Disabled', 35 | '1' => 'Enabled', 36 | ])->default(1), 37 | ]); 38 | } 39 | 40 | public static function table(Table $table) 41 | { 42 | return $table 43 | ->columns([ 44 | Columns\Text::make("name")->sortable()->searchable(), 45 | ]) 46 | ->filters([ 47 | ]); 48 | } 49 | 50 | public static function relations() 51 | { 52 | return [ 53 | PackageRelationManager::class, 54 | ]; 55 | } 56 | 57 | public static function routes() 58 | { 59 | return [ 60 | Pages\ListChannels::routeTo('/', 'index'), 61 | Pages\CreateChannel::routeTo('/create', 'create'), 62 | Pages\EditChannel::routeTo('/{record}/edit', 'edit'), 63 | Pages\SortChannels::routeTo('/sort', 'sort'), 64 | ]; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/Filament/Resources/ChannelResource/Pages/CreateChannel.php: -------------------------------------------------------------------------------- 1 | firstOrFail()->update(['pos'=>$param['order']]); 18 | } 19 | } 20 | 21 | protected function viewData() { 22 | return [ 23 | 'channels' => Channel::all() 24 | ]; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/Filament/Resources/ClientResource.php: -------------------------------------------------------------------------------- 1 | schema([ 26 | Components\TextInput::make("uuid")->default(Uuid::uuid4())->disabled(), 27 | Components\TextInput::make("short_url")->default(Str::random(12))->disabled(), 28 | Components\TextInput::make("name")->required(), 29 | Components\TextInput::make("comment"), 30 | Components\BelongsToSelect::make("package_id")->relationship("packages", "name")->preload()->required(), 31 | Components\Select::make("active")->options([ 32 | '0' => 'Disabled', 33 | '1' => 'Enabled', 34 | ])->default(1), 35 | ]); 36 | } 37 | 38 | public static function table(Table $table) 39 | { 40 | return $table 41 | ->columns([ 42 | Columns\Text::make("name"), 43 | Columns\Text::make("comment"), 44 | Columns\Text::make("active"), 45 | ShortUrl::make("short_url"), 46 | ]) 47 | ->filters([ 48 | // 49 | ]); 50 | } 51 | 52 | public static function relations() 53 | { 54 | return [ 55 | // 56 | ]; 57 | } 58 | 59 | public static function routes() 60 | { 61 | return [ 62 | Pages\ListClients::routeTo('/', 'index'), 63 | Pages\CreateClient::routeTo('/create', 'create'), 64 | Pages\EditClient::routeTo('/{record}/edit', 'edit'), 65 | ]; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/Filament/Resources/ClientResource/Pages/CreateClient.php: -------------------------------------------------------------------------------- 1 | schema([ 24 | Components\TextInput::make("name")->required(), 25 | ]); 26 | } 27 | 28 | public static function table(Table $table) 29 | { 30 | return $table 31 | ->columns([ 32 | Columns\Text::make("name"), 33 | ]) 34 | ->filters([ 35 | // 36 | ]); 37 | } 38 | 39 | public static function relations() 40 | { 41 | return [ 42 | 43 | ]; 44 | } 45 | 46 | public static function routes() 47 | { 48 | return [ 49 | Pages\ListPackages::routeTo('/', 'index'), 50 | Pages\CreatePackage::routeTo('/create', 'create'), 51 | Pages\EditPackage::routeTo('/{record}/edit', 'edit'), 52 | ]; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/Filament/Resources/PackageResource/Pages/CreatePackage.php: -------------------------------------------------------------------------------- 1 | message = 'backend updated'; 16 | 17 | NatsService::update(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/TokensController.php: -------------------------------------------------------------------------------- 1 | get(); 13 | 14 | $response = []; 15 | 16 | foreach($clients as $client) { 17 | $response['addr'][$client->ip_addr] = true; 18 | $response['ip'][$client->short_url] = $client->ip_addr; 19 | $response['ch'][$client->short_url] = $client->ch; 20 | 21 | } 22 | 23 | return response()->json((object)$response); 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | URL($uuid)->firstOrFail(); 14 | 15 | $client->update(['ip_addr'=>request()->server("REMOTE_ADDR")]); 16 | 17 | $list = $client->channels->mapWithKeys(function($item, $key) use ($client) { 18 | return [$key=>['name'=>$item->name, 'url'=>env("APP_URL").'/i/get/'.$client->short_url.'/'.$item->uuid,'epg'=>$item->epg1]]; 19 | }); 20 | 21 | $template = "#EXTINF:-1 tvg-id=\"%s\",%s\n%s\n"; 22 | 23 | $response = "#EXTM3U\n"; 24 | foreach($list as $channel) { 25 | $response .= sprintf($template, $channel['epg'], $channel['name'], $channel['url']); 26 | } 27 | 28 | return response($response, 200, array('Content-Type' => 'text/plain')); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/Public/GetChannelController.php: -------------------------------------------------------------------------------- 1 | firstOrFail(); 16 | 17 | $client = Client::URL($url)->firstOrFail(); 18 | 19 | $client->update([ 20 | 'ip_addr'=>request()->server("REMOTE_ADDR"), 21 | 'ch' => $uuid, 22 | ]); 23 | 24 | 25 | Http::get(env("VIDEO_GATEWAY")."/reload"); 26 | 27 | $response = "#EXTM3U\n"; 28 | $response .= "#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2024000\n"; 29 | $response .= sprintf("%s/streams/%s/%s/stream.m3u8", env("APP_URL"), $url, $channel->uuid); 30 | 31 | return response($response, 200, array('Content-Type' => 'text/plain')); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 33 | \App\Http\Middleware\EncryptCookies::class, 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 35 | \Illuminate\Session\Middleware\StartSession::class, 36 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 38 | \App\Http\Middleware\VerifyCsrfToken::class, 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 40 | ], 41 | 42 | 'api' => [ 43 | // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 44 | 'throttle:api', 45 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 46 | ], 47 | ]; 48 | 49 | /** 50 | * The application's route middleware. 51 | * 52 | * These middleware may be assigned to groups or used individually. 53 | * 54 | * @var array 55 | */ 56 | protected $routeMiddleware = [ 57 | 'auth' => \App\Http\Middleware\Authenticate::class, 58 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 59 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 60 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 61 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 62 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 63 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 64 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 65 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 66 | ]; 67 | } 68 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | orderBy('pos', 'asc'); 21 | }); 22 | } 23 | 24 | public function scopeUUID($builder, $uuid) 25 | { 26 | return $builder->where("uuid", $uuid); 27 | } 28 | 29 | public function packages() 30 | { 31 | return $this->belongsToMany(Package::class, 'channels_packages', 'channel_id', 'package_id', 'id', 'id'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Models/ChannelsPackage.php: -------------------------------------------------------------------------------- 1 | where("uuid", $uuid)->orWhere("short_url", $uuid); 16 | } 17 | 18 | public function channels() { 19 | return $this->belongsToMany(Channel::class, 'channels_packages', 'package_id', 'channel_id', 'package_id', 'id'); 20 | } 21 | 22 | public function packages() { 23 | return $this->belongsTo(Package::class, 'package_id', "id"); 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /app/Models/Package.php: -------------------------------------------------------------------------------- 1 | belongsToMany(Channel::class, 'channels_packages', 'package_id', 'channel_id', 'id', 'id'); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 45 | ]; 46 | } 47 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 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 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 39 | 40 | $this->routes(function () { 41 | Route::prefix('api') 42 | ->middleware('api') 43 | ->namespace($this->namespace) 44 | ->group(base_path('routes/api.php')); 45 | 46 | Route::middleware('web') 47 | ->namespace($this->namespace) 48 | ->group(base_path('routes/web.php')); 49 | }); 50 | } 51 | 52 | /** 53 | * Configure the rate limiters for the application. 54 | * 55 | * @return void 56 | */ 57 | protected function configureRateLimiting() 58 | { 59 | RateLimiter::for('api', function (Request $request) { 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); 61 | }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/Service/NatsService.php: -------------------------------------------------------------------------------- 1 | get(); 12 | $cache = Channel::where("ffmpeg", false)->get(); 13 | 14 | 15 | $response = [ 16 | 'videoffmpeg' => [], 17 | 'videocache' => [], 18 | ]; 19 | 20 | foreach($ffmpeg as $f) { 21 | $response['videoffmpeg'][] = [ 22 | 'url' => $f->stream_url, 23 | 'name' => $f->uuid, 24 | ]; 25 | } 26 | 27 | foreach($cache as $f) { 28 | $response['videocache'][] = [ 29 | 'url' => $f->stream_url, 30 | 'name' => $f->uuid, 31 | ]; 32 | } 33 | 34 | $message = json_encode($response); 35 | self::send($message); 36 | } 37 | 38 | 39 | public static function send($message) { 40 | $topic = env("NATS_TOPIC", "super-config"); 41 | $natsServer = env("NATS_PROXY", "http://sr-nats-proxy"); 42 | 43 | $url = sprintf("%s?topic=%s", $natsServer, $topic); 44 | 45 | Http::withBody($message, 'text/plain') 46 | ->post($url); 47 | } 48 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /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": "^7.3|^8.0", 9 | "filament/filament": "^1.13", 10 | "fruitcake/laravel-cors": "^2.0", 11 | "guzzlehttp/guzzle": "^7.4", 12 | "laravel/framework": "^8.65", 13 | "laravel/sanctum": "^2.11", 14 | "laravel/tinker": "^2.5" 15 | }, 16 | "require-dev": { 17 | "barryvdh/laravel-debugbar": "^3.6", 18 | "facade/ignition": "^2.5", 19 | "fakerphp/faker": "^1.9.1", 20 | "laravel/sail": "^1.12", 21 | "mockery/mockery": "^1.4.4", 22 | "nunomaduro/collision": "^5.10", 23 | "phpunit/phpunit": "^9.5.10" 24 | }, 25 | "autoload": { 26 | "psr-4": { 27 | "App\\": "app/", 28 | "Database\\Factories\\": "database/factories/", 29 | "Database\\Seeders\\": "database/seeders/" 30 | } 31 | }, 32 | "autoload-dev": { 33 | "psr-4": { 34 | "Tests\\": "tests/" 35 | } 36 | }, 37 | "scripts": { 38 | "post-autoload-dump": [ 39 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 40 | "@php artisan package:discover --ansi" 41 | ], 42 | "post-update-cmd": [ 43 | "@php artisan vendor:publish --tag=laravel-assets --ansi" 44 | ], 45 | "post-root-package-install": [ 46 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 47 | ], 48 | "post-create-project-cmd": [ 49 | "@php artisan key:generate --ansi" 50 | ] 51 | }, 52 | "extra": { 53 | "laravel": { 54 | "dont-discover": [] 55 | } 56 | }, 57 | "config": { 58 | "optimize-autoloader": true, 59 | "preferred-install": "dist", 60 | "sort-packages": true 61 | }, 62 | "minimum-stability": "dev", 63 | "prefer-stable": true 64 | } 65 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | ], 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | User Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | All authentication drivers have a user provider. This defines how the 51 | | users are actually retrieved out of your database or other storage 52 | | mechanisms used by this application to persist your user's data. 53 | | 54 | | If you have multiple user tables or models you may configure multiple 55 | | sources which represent each model / table. These sources may then 56 | | be assigned to any extra authentication guards you have defined. 57 | | 58 | | Supported: "database", "eloquent" 59 | | 60 | */ 61 | 62 | 'providers' => [ 63 | 'users' => [ 64 | 'driver' => 'eloquent', 65 | 'model' => App\Models\User::class, 66 | ], 67 | 68 | // 'users' => [ 69 | // 'driver' => 'database', 70 | // 'table' => 'users', 71 | // ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Resetting Passwords 77 | |-------------------------------------------------------------------------- 78 | | 79 | | You may specify multiple password reset configurations if you have more 80 | | than one user table or model in the application and you want to have 81 | | separate password reset settings based on the specific user types. 82 | | 83 | | The expire time is the number of minutes that the reset token should be 84 | | considered valid. This security feature keeps tokens short-lived so 85 | | they have less time to be guessed. You may change this as needed. 86 | | 87 | */ 88 | 89 | 'passwords' => [ 90 | 'users' => [ 91 | 'provider' => 'users', 92 | 'table' => 'password_resets', 93 | 'expire' => 60, 94 | 'throttle' => 60, 95 | ], 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Password Confirmation Timeout 101 | |-------------------------------------------------------------------------- 102 | | 103 | | Here you may define the amount of seconds before a password confirmation 104 | | times out and the user is prompted to re-enter their password via the 105 | | confirmation screen. By default, the timeout lasts for three hours. 106 | | 107 | */ 108 | 109 | 'password_timeout' => 10800, 110 | 111 | ]; 112 | -------------------------------------------------------------------------------- /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 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'ably' => [ 45 | 'driver' => 'ably', 46 | 'key' => env('ABLY_KEY'), 47 | ], 48 | 49 | 'redis' => [ 50 | 'driver' => 'redis', 51 | 'connection' => 'default', 52 | ], 53 | 54 | 'log' => [ 55 | 'driver' => 'log', 56 | ], 57 | 58 | 'null' => [ 59 | 'driver' => 'null', 60 | ], 61 | 62 | ], 63 | 64 | ]; 65 | -------------------------------------------------------------------------------- /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 a RAM based store such as APC or Memcached, there might 103 | | be other applications utilizing the same cache. So, we'll specify a 104 | | value to get prefixed to all our keys so we can avoid collisions. 105 | | 106 | */ 107 | 108 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 'schema' => '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 | ], 93 | 94 | ], 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Migration Repository Table 99 | |-------------------------------------------------------------------------- 100 | | 101 | | This table keeps track of all the migrations that have already run for 102 | | your application. Using this information, we can determine which of 103 | | the migrations on disk haven't actually been run in the database. 104 | | 105 | */ 106 | 107 | 'migrations' => 'migrations', 108 | 109 | /* 110 | |-------------------------------------------------------------------------- 111 | | Redis Databases 112 | |-------------------------------------------------------------------------- 113 | | 114 | | Redis is an open source, fast, and advanced key-value store that also 115 | | provides a richer body of commands than a typical key-value system 116 | | such as APC or Memcached. Laravel makes it easy to dig right in. 117 | | 118 | */ 119 | 120 | 'redis' => [ 121 | 122 | 'client' => env('REDIS_CLIENT', 'phpredis'), 123 | 124 | 'options' => [ 125 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 126 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 127 | ], 128 | 129 | 'default' => [ 130 | 'url' => env('REDIS_URL'), 131 | 'host' => env('REDIS_HOST', '127.0.0.1'), 132 | 'password' => env('REDIS_PASSWORD', null), 133 | 'port' => env('REDIS_PORT', '6379'), 134 | 'database' => env('REDIS_DB', '0'), 135 | ], 136 | 137 | 'cache' => [ 138 | 'url' => env('REDIS_URL'), 139 | 'host' => env('REDIS_HOST', '127.0.0.1'), 140 | 'password' => env('REDIS_PASSWORD', null), 141 | 'port' => env('REDIS_PORT', '6379'), 142 | 'database' => env('REDIS_CACHE_DB', '1'), 143 | ], 144 | 145 | ], 146 | 147 | ]; 148 | -------------------------------------------------------------------------------- /config/filament.php: -------------------------------------------------------------------------------- 1 | env('FILAMENT_PATH', 'admin'), 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Filament Domain 31 | |-------------------------------------------------------------------------- 32 | | 33 | | You may change the domain where Filament should be active. If the domain 34 | | is empty, all domains will be valid. 35 | | 36 | */ 37 | 38 | 'domain' => env('FILAMENT_DOMAIN', null), 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Auth 43 | |-------------------------------------------------------------------------- 44 | | 45 | | This is the configuration that Filament will use to handle authentication 46 | | into the admin panel. 47 | | 48 | */ 49 | 50 | 'auth' => [ 51 | 'guard' => env('FILAMENT_AUTH_GUARD', 'filament'), 52 | 'logout_redirect_route' => 'filament.auth.login', 53 | ], 54 | 55 | /* 56 | |-------------------------------------------------------------------------- 57 | | Pages 58 | |-------------------------------------------------------------------------- 59 | | 60 | | This is the namespace and directory that Filament will automatically 61 | | register pages from. 62 | | 63 | */ 64 | 65 | 'pages' => [ 66 | 'namespace' => 'App\\Filament\\Pages', 67 | 'path' => app_path('Filament/Pages'), 68 | ], 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Resources 73 | |-------------------------------------------------------------------------- 74 | | 75 | | This is the namespace and directory that Filament will automatically 76 | | register resources from. 77 | | 78 | */ 79 | 80 | 'resources' => [ 81 | 'namespace' => 'App\\Filament\\Resources', 82 | 'path' => app_path('Filament/Resources'), 83 | ], 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | Roles 88 | |-------------------------------------------------------------------------- 89 | | 90 | | This is the namespace and directory that Filament will automatically 91 | | register roles from. 92 | | 93 | */ 94 | 95 | 'roles' => [ 96 | 'namespace' => 'App\\Filament\\Roles', 97 | 'path' => app_path('Filament/Roles'), 98 | ], 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Widgets 103 | |-------------------------------------------------------------------------- 104 | | 105 | | This is the namespace and directory that Filament will automatically 106 | | register widgets from. 107 | | 108 | */ 109 | 110 | 'widgets' => [ 111 | 'namespace' => 'App\\Filament\\Widgets', 112 | 'path' => app_path('Filament/Widgets'), 113 | 'default' => [ 114 | 'account' => true, 115 | 'info' => false, 116 | ], 117 | ], 118 | 119 | /* 120 | |-------------------------------------------------------------------------- 121 | | Default Filesystem Disk 122 | |-------------------------------------------------------------------------- 123 | | 124 | | This is the storage disk Filament will use to put media. You may use any 125 | | of the disks defined in the `config/filesystems.php`. 126 | | 127 | */ 128 | 129 | 'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DRIVER', 'public'), 130 | 131 | /* 132 | |-------------------------------------------------------------------------- 133 | | User Resource 134 | |-------------------------------------------------------------------------- 135 | | 136 | | This is the user resource class that Filament will use to generate tables 137 | | and forms to manage users. 138 | | 139 | */ 140 | 141 | 'user_resource' => \Filament\Resources\UserResource::class, 142 | 143 | /* 144 | |-------------------------------------------------------------------------- 145 | | Avatar Provider 146 | |-------------------------------------------------------------------------- 147 | | 148 | | This is the service that will be used to retrieve default avatars if one 149 | | has not been uploaded. 150 | | 151 | */ 152 | 153 | 'avatar_provider' => \Filament\AvatarProviders\GravatarProvider::class, 154 | 155 | /* 156 | |-------------------------------------------------------------------------- 157 | | Middleware 158 | |-------------------------------------------------------------------------- 159 | | 160 | | You may customise the middleware stack that Filament uses to handle 161 | | requests. 162 | | 163 | */ 164 | 165 | 'middleware' => [ 166 | 'auth' => [ 167 | Authenticate::class, 168 | ], 169 | 'base' => [ 170 | EncryptCookies::class, 171 | AddQueuedCookiesToResponse::class, 172 | StartSession::class, 173 | AuthenticateSession::class, 174 | ShareErrorsFromSession::class, 175 | VerifyCsrfToken::class, 176 | SubstituteBindings::class, 177 | DispatchServingFilamentEvent::class, 178 | ], 179 | 'guest' => [ 180 | RedirectIfAuthenticated::class, 181 | ], 182 | ], 183 | 184 | /* 185 | |-------------------------------------------------------------------------- 186 | | Cache 187 | |-------------------------------------------------------------------------- 188 | | 189 | | This is the cache disk Filament will use, you may use any of the disks 190 | | defined in the `config/filesystems.php`. 191 | | 192 | */ 193 | 194 | 'cache_disk' => env('FILAMENT_CACHE_DISK', 'local'), 195 | 196 | /* 197 | |-------------------------------------------------------------------------- 198 | | Cache Path Prefix 199 | |-------------------------------------------------------------------------- 200 | | 201 | | This is the cache path prefix used by Filament. It is relative to the 202 | | disk defined above. 203 | | 204 | */ 205 | 206 | 'cache_path_prefix' => 'filament/cache', 207 | 208 | ]; 209 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', '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 setup for each driver as an example of the required options. 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 | ], 37 | 38 | 'public' => [ 39 | 'driver' => 'local', 40 | 'root' => storage_path('app/public'), 41 | 'url' => env('APP_URL').'/storage', 42 | 'visibility' => 'public', 43 | ], 44 | 45 | 's3' => [ 46 | 'driver' => 's3', 47 | 'key' => env('AWS_ACCESS_KEY_ID'), 48 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 49 | 'region' => env('AWS_DEFAULT_REGION'), 50 | 'bucket' => env('AWS_BUCKET'), 51 | 'url' => env('AWS_URL'), 52 | 'endpoint' => env('AWS_ENDPOINT'), 53 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 54 | ], 55 | 56 | ], 57 | 58 | /* 59 | |-------------------------------------------------------------------------- 60 | | Symbolic Links 61 | |-------------------------------------------------------------------------- 62 | | 63 | | Here you may configure the symbolic links that will be created when the 64 | | `storage:link` Artisan command is executed. The array keys should be 65 | | the locations of the links and the values should be their targets. 66 | | 67 | */ 68 | 69 | 'links' => [ 70 | public_path('storage') => storage_path('app/public'), 71 | ], 72 | 73 | ]; 74 | -------------------------------------------------------------------------------- /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' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /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' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Log Channels 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may configure the log channels for your application. Out of 41 | | the box, Laravel uses the Monolog PHP logging library. This gives 42 | | you a variety of powerful log handlers / formatters to utilize. 43 | | 44 | | Available Drivers: "single", "daily", "slack", "syslog", 45 | | "errorlog", "monolog", 46 | | "custom", "stack" 47 | | 48 | */ 49 | 50 | 'channels' => [ 51 | 'stack' => [ 52 | 'driver' => 'stack', 53 | 'channels' => ['single'], 54 | 'ignore_exceptions' => false, 55 | ], 56 | 57 | 'single' => [ 58 | 'driver' => 'single', 59 | 'path' => storage_path('logs/laravel.log'), 60 | 'level' => env('LOG_LEVEL', 'debug'), 61 | ], 62 | 63 | 'daily' => [ 64 | 'driver' => 'daily', 65 | 'path' => storage_path('logs/laravel.log'), 66 | 'level' => env('LOG_LEVEL', 'debug'), 67 | 'days' => 14, 68 | ], 69 | 70 | 'slack' => [ 71 | 'driver' => 'slack', 72 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 73 | 'username' => 'Laravel Log', 74 | 'emoji' => ':boom:', 75 | 'level' => env('LOG_LEVEL', 'critical'), 76 | ], 77 | 78 | 'papertrail' => [ 79 | 'driver' => 'monolog', 80 | 'level' => env('LOG_LEVEL', 'debug'), 81 | 'handler' => SyslogUdpHandler::class, 82 | 'handler_with' => [ 83 | 'host' => env('PAPERTRAIL_URL'), 84 | 'port' => env('PAPERTRAIL_PORT'), 85 | ], 86 | ], 87 | 88 | 'stderr' => [ 89 | 'driver' => 'monolog', 90 | 'level' => env('LOG_LEVEL', 'debug'), 91 | 'handler' => StreamHandler::class, 92 | 'formatter' => env('LOG_STDERR_FORMATTER'), 93 | 'with' => [ 94 | 'stream' => 'php://stderr', 95 | ], 96 | ], 97 | 98 | 'stdout' => [ 99 | 'driver' => 'monolog', 100 | 'level' => env('LOG_LEVEL', 'debug'), 101 | 'handler' => StreamHandler::class, 102 | 'formatter' => env('LOG_STDERR_FORMATTER'), 103 | 'with' => [ 104 | 'stream' => 'php://stdout', 105 | ], 106 | ], 107 | 108 | 'syslog' => [ 109 | 'driver' => 'syslog', 110 | 'level' => env('LOG_LEVEL', 'debug'), 111 | ], 112 | 113 | 'errorlog' => [ 114 | 'driver' => 'errorlog', 115 | 'level' => env('LOG_LEVEL', 'debug'), 116 | ], 117 | 118 | 'null' => [ 119 | 'driver' => 'monolog', 120 | 'handler' => NullHandler::class, 121 | ], 122 | 123 | 'emergency' => [ 124 | 'path' => storage_path('logs/laravel.log'), 125 | ], 126 | ], 127 | 128 | ]; 129 | -------------------------------------------------------------------------------- /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 | 'auth_mode' => null, 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' => '/usr/sbin/sendmail -bs', 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/sanctum.php: -------------------------------------------------------------------------------- 1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( 17 | '%s%s', 18 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', 19 | env('APP_URL') ? ','.parse_url(env('APP_URL'), PHP_URL_HOST) : '' 20 | ))), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Sanctum Guards 25 | |-------------------------------------------------------------------------- 26 | | 27 | | This array contains the authentication guards that will be checked when 28 | | Sanctum is trying to authenticate a request. If none of these guards 29 | | are able to authenticate the request, Sanctum will use the bearer 30 | | token that's present on an incoming request for authentication. 31 | | 32 | */ 33 | 34 | 'guard' => ['web'], 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Expiration Minutes 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This value controls the number of minutes until an issued token will be 42 | | considered expired. If this value is null, personal access tokens do 43 | | not expire. This won't tweak the lifetime of first-party sessions. 44 | | 45 | */ 46 | 47 | 'expiration' => null, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Sanctum Middleware 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When authenticating your first-party SPA with Sanctum you may need to 55 | | customize some of the middleware Sanctum uses while processing the 56 | | request. You may change the middleware listed below as required. 57 | | 58 | */ 59 | 60 | 'middleware' => [ 61 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, 62 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, 63 | ], 64 | 65 | ]; 66 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /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', null), 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', null), 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', null), 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/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 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name(), 19 | 'email' => $this->faker->unique()->safeEmail(), 20 | 'email_verified_at' => now(), 21 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 22 | 'remember_token' => Str::random(10), 23 | ]; 24 | } 25 | 26 | /** 27 | * Indicate that the model's email address should be unverified. 28 | * 29 | * @return \Illuminate\Database\Eloquent\Factories\Factory 30 | */ 31 | public function unverified() 32 | { 33 | return $this->state(function (array $attributes) { 34 | return [ 35 | 'email_verified_at' => null, 36 | ]; 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->string('password'); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('users'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('uuid')->unique(); 19 | $table->text('connection'); 20 | $table->text('queue'); 21 | $table->longText('payload'); 22 | $table->longText('exception'); 23 | $table->timestamp('failed_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('failed_jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->morphs('tokenable'); 19 | $table->string('name'); 20 | $table->string('token', 64)->unique(); 21 | $table->text('abilities')->nullable(); 22 | $table->timestamp('last_used_at')->nullable(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('personal_access_tokens'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2021_11_18_180649_initial_db_migration.php: -------------------------------------------------------------------------------- 1 | id(); 13 | $table->timestamps(); 14 | $table->softDeletes(); 15 | 16 | $table->uuid("uuid")->unique(); 17 | 18 | 19 | $table->string("url")->nullable(); 20 | $table->string("name")->nullable(); 21 | 22 | $table->string("epg1")->nullable(); 23 | $table->string("epg2")->nullable(); 24 | $table->string("epg3")->nullable(); 25 | 26 | $table->string("stream_url")->nullable(); 27 | 28 | $table->string("image")->nullable(); 29 | 30 | $table->string("extra_text1")->nullable(); 31 | $table->string("extra_text2")->nullable(); 32 | $table->string("extra_text3")->nullable(); 33 | $table->string("extra_text4")->nullable(); 34 | $table->string("extra_text5")->nullable(); 35 | 36 | $table->boolean("ffmpeg")->default(0); 37 | $table->boolean("active")->default(1); 38 | 39 | $table->integer("pos")->nullable(); 40 | 41 | 42 | }); 43 | 44 | Schema::create('channels_packages', function (Blueprint $table) { 45 | $table->bigInteger("channel_id")->unsigned(); 46 | $table->bigInteger("package_id")->unsigned(); 47 | $table->unique(['channel_id', 'package_id'], 'channel_package_uniq_idx'); 48 | $table->index(['package_id','channel_id'], 'package_channel_idx'); 49 | }); 50 | 51 | Schema::create('packages', function (Blueprint $table) { 52 | $table->id(); 53 | $table->timestamps(); 54 | $table->softDeletes(); 55 | $table->string("name"); 56 | }); 57 | 58 | 59 | Schema::create('clients', function (Blueprint $table) { 60 | $table->id(); 61 | $table->timestamps(); 62 | $table->softDeletes(); 63 | $table->uuid("uuid")->unique(); 64 | $table->string("short_url", 12)->unique(); 65 | $table->string("name"); 66 | $table->string("comment")->nullable(); 67 | $table->string("mac")->nullable(); 68 | $table->uuid("token")->nullable()->unique(); 69 | $table->bigInteger("package_id")->unsigned(); 70 | $table->boolean("active"); 71 | $table->timestamp("seen")->nullable(); 72 | $table->ipAddress("ip_addr")->nullable(); 73 | 74 | $table->integer("type_id")->nullable(); 75 | 76 | $table->string("extra_text1")->nullable(); 77 | $table->string("extra_text2")->nullable(); 78 | $table->string("extra_text3")->nullable(); 79 | $table->string("extra_text4")->nullable(); 80 | $table->string("extra_text5")->nullable(); 81 | }); 82 | 83 | Schema::create('settings', function (Blueprint $table) { 84 | $table->string("key")->primary(); 85 | $table->string("value")->nullable(); 86 | }); 87 | 88 | 89 | } 90 | 91 | public function down() 92 | { 93 | Schema::dropIfExists('channels'); 94 | Schema::dropIfExists('users'); 95 | Schema::dropIfExists('channels_packages'); 96 | Schema::dropIfExists('packages'); 97 | Schema::dropIfExists('clients'); 98 | Schema::dropIfExists('settings'); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /database/migrations/2021_11_21_205049_add_ch_to_clients_table.php: -------------------------------------------------------------------------------- 1 | string("ch")->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('clients', function (Blueprint $table) { 29 | $table->dropColumn('ch'); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call([ 17 | DefaultUserSeeder::class, 18 | ]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /database/seeders/DefaultUserSeeder.php: -------------------------------------------------------------------------------- 1 | exists(); 14 | if ($count == 0) { 15 | User::create([ 16 | 'name' => 'Admin', 17 | 'email' => env("ADMIN_EMAIL"), 18 | 'password' => bcrypt(env("ADMIn_PASSWORD")), 19 | 'email_verified_at' => now(), 20 | ]); 21 | } 22 | 23 | $model = Filament::auth()->getProvider()->getModel(); 24 | 25 | $count = $model::where("email", env("ADMIN_EMAIL"))->exists(); 26 | if ($count == 0) { 27 | $model::create([ 28 | 'name' => 'Admin', 29 | 'email' => env("ADMIN_EMAIL"), 30 | 'password' => bcrypt(env("ADMIN_PASSWORD")), 31 | ]); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "mix", 6 | "watch": "mix watch", 7 | "watch-poll": "mix watch -- --watch-options-poll=1000", 8 | "hot": "mix watch --hot", 9 | "prod": "npm run production", 10 | "production": "mix --production" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.21", 14 | "laravel-mix": "^6.0.6", 15 | "lodash": "^4.17.19", 16 | "postcss": "^8.1.14" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/streamingriver/opensource-iptv/a6bac5cda034df318891f2520c465bec3ec90edb/public/favicon.ico -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/streamingriver/opensource-iptv/a6bac5cda034df318891f2520c465bec3ec90edb/resources/css/app.css -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | require('./bootstrap'); 2 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load the axios HTTP library which allows us to easily issue requests 5 | * to our Laravel back-end. This library automatically handles sending the 6 | * CSRF token as a header based on the value of the "XSRF" token cookie. 7 | */ 8 | 9 | window.axios = require('axios'); 10 | 11 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 12 | 13 | /** 14 | * Echo exposes an expressive API for subscribing to channels and listening 15 | * for events that are broadcast by Laravel. Echo and event broadcasting 16 | * allows your team to easily build robust real-time web applications. 17 | */ 18 | 19 | // import Echo from 'laravel-echo'; 20 | 21 | // window.Pusher = require('pusher-js'); 22 | 23 | // window.Echo = new Echo({ 24 | // broadcaster: 'pusher', 25 | // key: process.env.MIX_PUSHER_APP_KEY, 26 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 27 | // forceTLS: true 28 | // }); 29 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/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 | -------------------------------------------------------------------------------- /resources/views/empty.blade.php: -------------------------------------------------------------------------------- 1 | empty 2 | -------------------------------------------------------------------------------- /resources/views/filament/resources/channel-resource/pages/sort-channels.blade.php: -------------------------------------------------------------------------------- 1 | @push('filament-scripts') 2 | 3 | @endpush 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 |
    12 | @foreach ($channels as $channel) 13 |
  • 14 |

    {{ $channel->name }}

    15 | {{-- --}} 16 |
  • 17 | @endforeach 18 |
19 | 20 | 21 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /resources/views/filament/tables/cells/short-url.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {{ env("APP_URL") }}/i/show/{{ $column->getValue($record) }} 3 |
4 | -------------------------------------------------------------------------------- /resources/views/filament/widgets/update-backend.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{-- Widget content --}} 4 |

Backend control

5 |
6 |
7 | 8 | 9 | @if($message) 10 | 11 | {{ $message }} 12 | @endif 13 |
14 |
15 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/auth/login.blade.php: -------------------------------------------------------------------------------- 1 |
5 | 6 | 7 | 8 | {{ __('filament::auth/login.buttons.submit.label') }} 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/auth/logout.blade.php: -------------------------------------------------------------------------------- 1 | 2 | {{ __('filament::auth/logout.button.label') }} 3 | 4 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/auth/register.blade.php: -------------------------------------------------------------------------------- 1 |
5 | 6 | 7 | 8 | {{ __('filament::auth.register') }} 9 | 10 | 11 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/auth/request-password.blade.php: -------------------------------------------------------------------------------- 1 |
5 | 6 | 7 | 8 | {{ __('filament::auth/request-password.buttons.submit.label') }} 9 | 10 | 11 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/auth/reset-password.blade.php: -------------------------------------------------------------------------------- 1 |
5 | 6 | 7 | 8 | {{ __('filament::auth/reset-password.buttons.submit.label') }} 9 | 10 | 11 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/app-content.blade.php: -------------------------------------------------------------------------------- 1 |
merge(['class' => 'flex-grow max-w-screen-xl mx-auto pb-4 md:mb-8 px-4 md:px-8']) }}> 2 | {{ $slot }} 3 |
4 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/app-header.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'breadcrumbs' => [], 3 | 'title', 4 | ]) 5 | 6 |
7 |
8 | 17 | 18 |
19 | @if (count($breadcrumbs)) 20 |

21 | @foreach ($breadcrumbs as $url => $label) 22 | {{ __($label) }} 23 | 24 | / 25 | @endforeach 26 |

27 | @endif 28 | 29 |

{{ __($title) }}

30 |
31 |
32 | 33 | {{ $actions ?? null }} 34 |
35 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/avatar.blade.php: -------------------------------------------------------------------------------- 1 | merge([ 2 | 'src' => $src(), 3 | 'srcset' => $srcSet(), 4 | 'alt' => $user->name, 5 | 'width' => $size, 6 | 'height' => $size, 7 | 'loading' => 'lazy' 8 | ]) }} /> 9 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/branding/app.blade.php: -------------------------------------------------------------------------------- 1 | 8 |
9 | {{ substr(config('app.name'), 0, 1) }} 10 |
11 | 12 | {{ config('app.name') }} 13 |
14 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/branding/auth.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'title', 3 | ]) 4 | 5 |

merge(['class' => 'text-center text-2xl md:text-3xl leading-tight font-medium']) }}>{{ __($title) }}

6 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/branding/footer.blade.php: -------------------------------------------------------------------------------- 1 | merge(['class' => 'inline-flex items-center opacity-20 hover:opacity-100 transition-opacity duration-500']) }} 6 | > 7 | 8 | 9 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/button.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'color' => 'white', 3 | 'disabled' => false, 4 | 'href' => null, 5 | 'size' => 'base', 6 | 'type' => 'button', 7 | ]) 8 | 9 | @php 10 | $colorClasses = [ 11 | 'danger' => 'border-transparent bg-danger-600 text-white hover:bg-danger-700 focus:ring-danger-200', 12 | 'primary' => 'border-transparent bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-200', 13 | 'white' => 'border-gray-300 bg-white text-gray-800 hover:bg-gray-100 focus:ring-primary-200', 14 | ][$color]; 15 | 16 | $disabledClasses = $disabled ? 'opacity-25 cursor-not-allowed' : ''; 17 | 18 | $sizeClasses = [ 19 | 'base' => 'text-sm py-2 px-4', 20 | 'small' => 'text-xs py-1 px-3', 21 | ][$size]; 22 | 23 | $classes = "cursor-pointer font-medium border rounded transition duration-200 shadow-sm focus:ring focus:ring-opacity-50 {$colorClasses} {$disabledClasses} {$sizeClasses}"; 24 | @endphp 25 | 26 | @unless ($href) 27 | 30 | @else 31 | merge(['class' => $classes, 'disabled' => $disabled]) }}> 32 | {{ $slot }} 33 | 34 | @endunless 35 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/card-header.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'title' 3 | ]) 4 | 5 |
merge(['class' => 'space-y-2']) }}> 6 |

7 | {{ __($title) }} 8 |

9 | 10 | {{ $slot }} 11 |
12 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/card.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'expanded' => false, 3 | ]) 4 | 5 |
class([ 6 | 'bg-white rounded p-4 md:p-6', 7 | 'col-span-full' => $expanded, 8 | ]) }}> 9 | {{ $slot }} 10 |
11 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/dropdown-link.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'button' => false, 3 | 'class' => 'w-full flex text-sm leading-tight text-left whitespace-nowrap rounded py-1.5 px-4 transition-colors duration-200 text-white hover:bg-primary-700', 4 | ]) 5 | 6 | @if ($button) 7 | 8 | @else 9 | merge(['class' => $class]) }}>{{ $slot }} 10 | @endif 11 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/dropdown.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'id' => Str::uuid(), 3 | 'asButton' => false, 4 | ]) 5 | 6 |
19 | @if ($asButton) 20 | 28 | {{ $button }} 29 | 30 | @else 31 | 42 | @endif 43 | 44 | 54 |
55 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/image.blade.php: -------------------------------------------------------------------------------- 1 | merge([ 2 | 'src' => $src(), 3 | 'srcset' => $srcSet(), 4 | ]) }} /> -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | Skip to content 3 | 4 |
11 |
13 | 42 | 43 | 53 |
54 | 55 | 57 | 58 |
59 |
60 | {{ $slot }} 61 |
62 | 63 |
64 | 65 |
66 |
67 |
68 |
69 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/layouts/auth.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 | 6 | {{ $slot }} 7 | 8 |
9 | 10 |
11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/layouts/base.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ __($title) ?? null }} {{ __($title) ?? false ? '|' : null }} {{ config('app.name') }} 9 | 10 | @livewireStyles 11 | 12 | 13 | 17 | 18 | @foreach (\Filament\Filament::getStyles() as $path) 19 | @if (Str::of($path)->startsWith(['http://', 'https://'])) 20 | 21 | @else 22 | 25 | @endif 26 | @endforeach 27 | 28 | @stack('filament-styles') 29 | 30 | 31 | 32 | {{ $slot }} 33 | 34 | 35 | 36 | @livewireScripts 37 | 40 | 41 | 45 | 46 | @foreach (\Filament\Filament::getScripts() as $path) 47 | 48 | @endforeach 49 | 50 | 51 | 52 | 53 | @stack('filament-scripts') 54 | 55 | 56 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/loader.blade.php: -------------------------------------------------------------------------------- 1 | merge(['class' => 'transition-all duration-300']) }}> 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/modal.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'closeButton' => false, 3 | 'name' => null, 4 | ]) 5 | 6 | except('class') }} 8 | x-data="{ open: false }" 9 | x-init=" 10 | $watch('open', value => { 11 | if (value === true) { 12 | document.body.classList.add('overflow-hidden') 13 | } else { 14 | document.body.classList.remove('overflow-hidden') 15 | } 16 | }); 17 | " 18 | x-on:keydown.escape.window="open = false" 19 | x-on:open.window="if ('{{ $name }}' && $event.detail === '{{ (string) Str::of($name)->replace('\\', '\\\\') }}') open = true" 20 | x-on:close.window="if ('{{ $name }}' && $event.detail === '{{ (string) Str::of($name)->replace('\\', '\\\\') }}') open = false" 21 | x-cloak 22 | > 23 | {{ $trigger ?? null }} 24 | 25 |
30 |
31 | 44 | 45 | 46 | 47 |
only('class')->merge(['class' => 'inline-block text-left align-bottom transition-all transform sm:my-8 sm:align-middle']) }} 59 | > 60 |
63 | @if ($closeButton) 64 | 71 | @endif 72 | 73 |
74 | {{ $slot }} 75 |
76 |
77 |
78 |
79 |
80 |
81 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/nav-link.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'activeRule', 3 | 'icon', 4 | 'label', 5 | 'url', 6 | ]) 7 | 8 | merge(['class' => 'px-4 py-3 flex items-center space-x-3 rtl:space-x-reverse rounded transition-color duration-200 hover:text-white ' . (request()->is($activeRule) ? 'text-white bg-gray-900' : 'text-current')]) }} 11 | > 12 | 13 | 14 | {{ __($label) }} 15 | 16 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/nav.blade.php: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/notification.blade.php: -------------------------------------------------------------------------------- 1 |
3 |
18 |
19 |
20 |
21 | 22 | 23 |
24 |

25 |
26 |
27 | 28 |
29 | 35 |
36 |
37 |
38 |
39 |
40 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/resources/forms/actions.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'actions' => [], 3 | ]) 4 | 5 |
6 | @foreach ($actions as $button) 7 | 13 | {{ __($button->getLabel()) }} 14 | 15 | @endforeach 16 |
17 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/resources/relations.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'owner', 3 | 'relations' => [], 4 | ]) 5 | 6 |
7 | @foreach ($relations as $manager) 8 | @livewire(\Livewire\Livewire::getAlias($manager, $manager::getName()), ['owner' => $owner], key($loop->index)) 9 | @endforeach 10 |
11 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/components/widget.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | {{ $slot }} 5 |
6 |
7 |
8 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/dashboard.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
9 | @if (config('filament.widgets.default.account', true)) 10 | 11 |
12 | 13 | 14 |
15 |

{{ __('filament::dashboard.widgets.account.heading', ['name' => \Filament\Filament::auth()->user()->name]) }}

16 |

{{ __('filament::dashboard.widgets.account.links.account.label') }}

17 |
18 |
19 |
20 | @endif 21 | 22 | @if (config('filament.widgets.default.info', true)) 23 | 24 |
25 | 43 |
44 |
45 | @endif 46 | 47 | @foreach (\Filament\Filament::getWidgets() as $widget) 48 | @livewire(\Livewire\Livewire::getAlias($widget)) 49 | @endforeach 50 |
51 |
52 |
53 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/edit-account.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |
10 | 11 | 12 | 16 | {{ __('filament::edit-account.buttons.save.label') }} 17 | 18 | 19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/relation-manager.blade.php: -------------------------------------------------------------------------------- 1 |
2 | @if (\Filament\Filament::can('viewAny', $this->getModel())) 3 | 4 |

5 | {{ __(static::getTitle()) }} 6 |

7 | 8 | @livewire(static::getComponent('list'), [ 9 | 'canAttach' => $this->canAttach(), 10 | 'canCreate' => $this->canCreate(), 11 | 'canDelete' => $this->canDelete(), 12 | 'canDetach' => $this->canDetach(), 13 | 'manager' => static::class, 14 | 'model' => $this->getModel(), 15 | 'owner' => $this->getOwner(), 16 | ]) 17 |
18 | 19 | @if ($this->canCreate()) 20 | 24 | 25 | 26 | 27 | @livewire(static::getComponent('create'), [ 28 | 'manager' => static::class, 29 | 'model' => $this->getModel(), 30 | 'owner' => $this->getOwner(), 31 | ]) 32 | 33 | 34 | @endif 35 | 36 | @if ($this->canEdit()) 37 | 41 | 42 | 43 | 44 | @livewire(static::getComponent('edit'), [ 45 | 'manager' => static::class, 46 | 'model' => $this->getModel(), 47 | 'owner' => $this->getOwner(), 48 | ]) 49 | 50 | 51 | @endif 52 | 53 | @if ($this->canAttach()) 54 | 58 | 59 | 60 | 61 | @livewire(static::getComponent('attach'), [ 62 | 'manager' => static::class, 63 | 'owner' => $this->getOwner(), 64 | ]) 65 | 66 | 67 | @endif 68 | @endif 69 |
70 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/resources/pages/.list-records.blade.php.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/streamingriver/opensource-iptv/a6bac5cda034df318891f2520c465bec3ec90edb/resources/views/vendor/filament/resources/pages/.list-records.blade.php.swp -------------------------------------------------------------------------------- /resources/views/vendor/filament/resources/pages/create-record.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 6 | 7 | 8 | @php 9 | $schema = $this->getForm()->getSchema(); 10 | @endphp 11 | 12 |
13 | @if ($this->getForm()->hasWrapper()) 14 | 15 | 16 | 17 | 18 | 19 | @else 20 | 21 | 22 | 23 | @endif 24 | 25 |
26 | 27 |
37 |
38 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/resources/pages/edit-record.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 6 | 7 | @if ($this->canDelete()) 8 | 9 | 10 | 14 | {{ __(static::$deleteButtonLabel) }} 15 | 16 | 17 | 18 | 19 | 20 |

21 | {{ __(static::$deleteModalDescription) }} 22 |

23 |
24 | 25 |
26 | 29 | {{ __(static::$deleteModalCancelButtonLabel) }} 30 | 31 | 32 | 36 | {{ __(static::$deleteModalConfirmButtonLabel) }} 37 | 38 |
39 |
40 |
41 | @endif 42 |
43 |
44 | 45 | 46 | @php 47 | $schema = $this->getForm()->getSchema(); 48 | @endphp 49 | 50 |
51 | @if ($this->getForm()->hasWrapper()) 52 | 53 | 54 | 55 | 56 | 57 | @else 58 | 59 | 60 | 61 | @endif 62 | 63 | 64 | 68 |
69 | 70 |
80 |
81 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/resources/pages/list-records.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
6 | @if (isset($this->canSort) && $this->canSort) 7 | 11 | {{ __(static::$sortButtonLabel) }} 12 | 13 |   14 | @endif 15 | 16 | @if ($this->canCreate()) 17 | 21 | {{ __(static::$createButtonLabel) }} 22 | 23 | @endif 24 | 25 |
26 |
27 |
28 | 29 | 30 |
31 |
32 | @if ($this->canDelete()) 33 | 34 | @endif 35 |
36 | 37 | 38 |
39 | 40 | 47 | 48 | @if ($this->hasPagination()) 49 | 50 | @endif 51 |
52 |
53 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/resources/relation-manager/attach-record.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
6 | 7 | 8 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/resources/relation-manager/create-record.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
6 | 7 | 8 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/resources/relation-manager/edit-record.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
6 | 7 | 8 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /resources/views/vendor/filament/resources/relation-manager/list-records.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | @if ($this->canCreate) 5 | 6 | {{ __($this->manager::$createButtonLabel) }} 7 | 8 | @endif 9 | 10 | @if ($this->canAttach) 11 | 12 | {{ __($this->manager::$attachButtonLabel) }} 13 | 14 | @endif 15 | 16 | @if ($this->canDetach) 17 | 22 | {{ __($this->manager::$detachButtonLabel) }} 23 | 24 | @endif 25 | 26 | @if ($this->canDelete) 27 | 28 | @endif 29 |
30 | 31 | 32 |
33 | 34 | 41 | 42 | @if ($this->canDetach) 43 | 46 | 47 | 48 |

49 | {{ __($this->manager::$detachModalDescription) }} 50 |

51 |
52 | 53 |
54 | 55 | {{ __($this->manager::$detachModalCancelButtonLabel) }} 56 | 57 | 58 | 63 | {{ __($this->manager::$detachModalDetachButtonLabel) }} 64 | 65 |
66 |
67 |
68 | @endif 69 |
70 | -------------------------------------------------------------------------------- /resources/views/vendor/tables/cells/boolean.blade.php: -------------------------------------------------------------------------------- 1 | @include('tables::cells.icon', [ 2 | 'classes' => $column->getValue($record) ? 'text-primary-600' : 'text-danger-700', 3 | ]) 4 | -------------------------------------------------------------------------------- /resources/views/vendor/tables/cells/icon.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | $iconToShow = null; 3 | 4 | foreach ($column->getOptions() as $icon => $callback) { 5 | if (! $callback($column->getValue($record))) { 6 | continue; 7 | } 8 | 9 | $iconToShow = $icon; 10 | 11 | break; 12 | } 13 | @endphp 14 | 15 | @if ($iconToShow) 16 | @if ($column->getAction($record) !== null) 17 | 23 | @elseif ($column->getUrl($record) !== null) 24 | shouldUrlOpenInNewTab()) 27 | target="_blank" 28 | rel="noopener noreferrer" 29 | @endif 30 | > 31 | 32 | 33 | @else 34 | 35 | @endif 36 | @endif 37 | -------------------------------------------------------------------------------- /resources/views/vendor/tables/cells/image.blade.php: -------------------------------------------------------------------------------- 1 | @if ($column->getAction($record) !== null) 2 | 15 | @elseif ($column->getUrl($record) !== null) 16 | shouldUrlOpenInNewTab()) 19 | target="_blank" 20 | rel="noopener noreferrer" 21 | @endif 22 | > 23 | getHeight()};" : null !!} 28 | {!! $column->getWidth() !== null ? "width: {$column->getWidth()};" : null !!} 29 | " 30 | /> 31 | 32 | @elseif ($column->getPath($record) !== null) 33 | getHeight()};" : null !!} 38 | {!! $column->getWidth() !== null ? "width: {$column->getWidth()};" : null !!} 39 | " 40 | /> 41 | @endif 42 | -------------------------------------------------------------------------------- /resources/views/vendor/tables/cells/text.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | $primaryClasses = $column->isPrimary() ? 'font-medium' : null; 3 | @endphp 4 | 5 |
6 | @if ($column->getAction($record) !== null) 7 | 14 | @elseif ($column->getUrl($record) !== null) 15 | shouldUrlOpenInNewTab()) 19 | target="_blank" 20 | rel="noopener noreferrer" 21 | @endif 22 | > 23 | {{ $column->getValue($record) }} 24 | 25 | @else 26 | {{ $column->getValue($record) }} 27 | @endif 28 |
29 | -------------------------------------------------------------------------------- /resources/views/vendor/tables/components/delete-selected.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'disabled' => true, 3 | ]) 4 | 5 | 20 | 28 | 29 |
34 |
35 | 48 | 49 | 50 | 51 | 101 |
102 |
103 |
104 | -------------------------------------------------------------------------------- /resources/views/vendor/tables/components/filter.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'table', 3 | ]) 4 | 5 |
6 | @if ($this->isFilterable()) 7 | 14 | @endif 15 | 16 | @if ($this->isSearchable()) 17 |
18 | 24 | 25 | 33 |
34 | @endif 35 |
36 | -------------------------------------------------------------------------------- /resources/views/vendor/tables/components/pagination/records-per-page-selector.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 8 | 9 | 12 |
13 | -------------------------------------------------------------------------------- /resources/views/vendor/tables/components/table.blade.php: -------------------------------------------------------------------------------- 1 | @props([ 2 | 'records' => [], 3 | 'selected' => [], 4 | 'sortColumn' => null, 5 | 'sortDirection' => 'asc', 6 | 'table', 7 | ]) 8 | 9 | @if ($this->isReorderable()) 10 | @pushonce('filament-scripts:table') 11 | 12 | @endpushonce 13 | @endif 14 | 15 |
16 | 17 | 18 | 19 | 27 | 28 | @foreach ($table->getVisibleColumns() as $column) 29 | 58 | @endforeach 59 | 60 | 61 | 62 | @if ($this->isReorderable()) 63 | 64 | @endif 65 | 66 | 67 | 68 | isReorderable()) wire:sortable="reorder" @endif 70 | class="text-sm leading-tight divide-y divide-gray-200" 71 | > 72 | @forelse ($records as $record) 73 | isReorderable()) wire:sortable.item="{{ $record->getKey() }}" @endif 77 | class="{{ $loop->index % 2 ? 'bg-gray-50' : 'bg-white' }}" 78 | > 79 | 87 | 88 | @foreach ($table->getVisibleColumns() as $column) 89 | 92 | @endforeach 93 | 94 | 99 | 100 | @if ($this->isReorderable()) 101 | 104 | @endif 105 | 106 | @empty 107 | 108 | 118 | 119 | @endforelse 120 | 121 |
20 | count() && $records->count() === count($selected) ? 'checked' : null }} 22 | wire:click="toggleSelectAll" 23 | type="checkbox" 24 | class="border-gray-300 rounded shadow-sm text-primary-600 focus:border-primary-600 focus:ring focus:ring-primary-200 focus:ring-opacity-50" 25 | /> 26 | 30 | @if ($this->isSortable() && $column->isSortable()) 31 | 52 | @else 53 |
54 | {{ __($column->getLabel()) }} 55 |
56 | @endif 57 |
80 | getKey(), $selected) ? 'checked' : null }} 82 | wire:click="toggleSelected('{{ $record->getKey() }}')" 83 | type="checkbox" 84 | class="border-gray-300 rounded shadow-sm text-primary-600 focus:border-primary-600 focus:ring focus:ring-blue-200 focus:ring-opacity-50" 85 | /> 86 | 90 | {{ $column->renderCell($record) }} 91 | 95 | @foreach ($table->getRecordActions() as $recordAction) 96 | {{ $recordAction->render($record) }} 97 | @endforeach 98 | 102 | 103 |
112 |
113 |

114 | {{ __('tables::table.messages.noRecords') }} 115 |

116 |
117 |
122 |
123 | -------------------------------------------------------------------------------- /resources/views/vendor/tables/record-actions/icon.blade.php: -------------------------------------------------------------------------------- 1 | @if ($action = $recordAction->getAction($record)) 2 | 10 | @elseif ($url = $recordAction->getUrl($record)) 11 | getTitle() ? 'title="' . __($recordAction->getTitle()) . '"' : null !!} 14 | @if ($recordAction->shouldUrlOpenInNewTab()) 15 | target="_blank" 16 | rel="noopener noreferrer" 17 | @endif 18 | class="font-medium transition-colors duration-200 text-primary-600 hover:text-primary-700" 19 | > 20 | 21 | 22 | @else 23 | 26 | 27 | 28 | @endif 29 | -------------------------------------------------------------------------------- /resources/views/vendor/tables/record-actions/link.blade.php: -------------------------------------------------------------------------------- 1 | @if ($action = $recordAction->getAction($record)) 2 | 14 | @elseif ($url = $recordAction->getUrl($record)) 15 | getTitle() ? 'title="' . __($recordAction->getTitle()) . '"' : null !!} 18 | @if ($recordAction->shouldUrlOpenInNewTab()) 19 | target="_blank" 20 | rel="noopener noreferrer" 21 | @endif 22 | class="inline-flex items-center font-medium transition-colors duration-200 text-primary-600 hover:underline hover:text-primary-700" 23 | > 24 | @if ($recordAction->hasIcon()) 25 | 26 | @endif 27 | 28 | {{ __($recordAction->getLabel()) }} 29 | 30 | @else 31 | 34 | @if ($recordAction->hasIcon()) 35 | 36 | @endif 37 | 38 | {{ __($recordAction->getLabel()) }} 39 | 40 | @endif 41 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel applications. By default, we are compiling the CSS 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .postCss('resources/css/app.css', 'public/css', [ 16 | // 17 | ]); 18 | --------------------------------------------------------------------------------