├── .gitignore ├── README.md ├── demo.jpg ├── docker-compose.dist.yml ├── dredd.yml ├── httpd.conf └── laravel ├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── .styleci.yml ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── API │ │ │ ├── Controller.php │ │ │ └── ExamplesController.php │ │ └── Controller.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ └── ExampleStoreRequest.php ├── Models │ ├── Example.php │ └── User.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php └── Virtual │ ├── ExampleShowRequest.php │ ├── ExampleStoreRequest.php │ ├── ProfileModel.php │ ├── StoreRequest.php │ └── UserModel.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── hashing.php ├── l5-swagger.php ├── logging.php ├── mail.php ├── queue.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_05_16_184117_create_examples_table.php │ └── 2019_08_19_000000_create_failed_jobs_table.php └── seeders │ ├── DatabaseSeeder.php │ └── ExamplesTableSeeder.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 │ ├── vendor │ └── l5-swagger │ │ ├── .gitkeep │ │ └── index.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── api-docs │ └── api-docs.json ├── app │ ├── .gitignore │ └── public │ │ └── .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 /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /databases/ 3 | /logs/ 4 | /laravel/public/js/ 5 | /laravel/public/css/ 6 | /docker-compose.yml 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel 8 + Swagger demo application 2 | 3 | This application based on Docker containers, here is the list: 4 | 5 | * mariadb - Database server 6 | * phpmyadmin - For management of MySQL 7 | * laravel - Login pages, API and VueJS 8 | 9 | ![Image](demo.jpg) 10 | 11 | ## How to use 12 | 13 | ### 1. Preparation 14 | 15 | Clone the repo and change your work directory to root of sources 16 | 17 | git clone https://github.com/EvilFreelancer/laravel-swagger-example.git 18 | cd laravel-swagger-example 19 | cp docker-compose.dist.yml docker-compose.yml 20 | 21 | Inside `docker-compose.yml` you need change the values to the ones you 22 | need, for example you do not want to tun this project on `8080` port, to 23 | fix that you need just change this line `80:8080` to what you need (`7777:8080`). 24 | 25 | Run first iteration of Docker environment 26 | 27 | docker-compose up -d 28 | 29 | ### 2. Install all required components 30 | 31 | I assume that there are no development tools on your computer, so you 32 | need to login to Laravel container: 33 | 34 | docker-compose exec laravel bash 35 | 36 | Install all dependencies 37 | 38 | composer install 39 | 40 | ### 3. Set up the application 41 | 42 | Create database and seed tables: 43 | 44 | php artisan migrate:fresh --seed 45 | 46 | ### 4. Generate swagger frontend 47 | 48 | 49 | Generate interactive documentation: 50 | 51 | php artisan l5-swagger:generate 52 | 53 | ## The End 54 | 55 | Now you just need open following page [http://localhost/api/documentation](http://localhost/api/documentation) in your browser. 56 | 57 | Thanks for reading! 58 | -------------------------------------------------------------------------------- /demo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvilFreelancer/laravel-swagger-example/fda4bd108053495c19fa7ff1ddd1d02a93c04f47/demo.jpg -------------------------------------------------------------------------------- /docker-compose.dist.yml: -------------------------------------------------------------------------------- 1 | version: "2.4" 2 | 3 | services: 4 | 5 | mariadb: 6 | image: mariadb:10 7 | restart: unless-stopped 8 | ports: 9 | - 127.0.0.1:3306:3306 10 | environment: 11 | - MYSQL_DATABASE=database 12 | - MYSQL_ROOT_PASSWORD=root_pass 13 | - MYSQL_ROOT_HOST=% 14 | - MYSQL_USER=user 15 | - MYSQL_PASSWORD=pass 16 | volumes: 17 | - ./databases/mariadb:/var/lib/mysql 18 | 19 | phpmyadmin: 20 | image: phpmyadmin/phpmyadmin 21 | restart: unless-stopped 22 | ports: 23 | - 127.0.0.1:8080:80 24 | links: 25 | - mariadb 26 | environment: 27 | - PMA_HOST=mariadb 28 | - PMA_USER=root 29 | - PMA_PASSWORD=root_pass 30 | 31 | laravel: 32 | image: evilfreelancer/dockavel:latest 33 | restart: unless-stopped 34 | user: 1000:1000 35 | links: 36 | - mariadb 37 | ports: 38 | - 80:8080 39 | volumes: 40 | - ./httpd.conf:/etc/apache2/httpd.conf 41 | - ./laravel:/app:rw 42 | -------------------------------------------------------------------------------- /dredd.yml: -------------------------------------------------------------------------------- 1 | color: true 2 | dry-run: null 3 | hookfiles: null 4 | language: nodejs 5 | require: null 6 | server: null 7 | server-wait: 3 8 | init: false 9 | custom: {} 10 | names: false 11 | only: [] 12 | reporter: [] 13 | output: [] 14 | header: [] 15 | sorted: false 16 | user: null 17 | inline-errors: false 18 | details: false 19 | method: [] 20 | loglevel: warning 21 | path: [] 22 | hooks-worker-timeout: 5000 23 | hooks-worker-connect-timeout: 1500 24 | hooks-worker-connect-retry: 500 25 | hooks-worker-after-connect-wait: 100 26 | hooks-worker-term-timeout: 5000 27 | hooks-worker-term-retry: 500 28 | hooks-worker-handler-host: 127.0.0.1 29 | hooks-worker-handler-port: 61321 30 | config: ./dredd.yml 31 | blueprint: 'http://localhost/docs/api-docs.json' 32 | endpoint: 'http://localhost/api' 33 | -------------------------------------------------------------------------------- /httpd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This is the main Apache HTTP server configuration file. It contains the 3 | # configuration directives that give the server its instructions. 4 | # See for detailed information. 5 | # In particular, see 6 | # 7 | # for a discussion of each configuration directive. 8 | # 9 | # Do NOT simply read the instructions in here without understanding 10 | # what they do. They're here only as hints or reminders. If you are unsure 11 | # consult the online docs. You have been warned. 12 | # 13 | # Configuration and logfile names: If the filenames you specify for many 14 | # of the server's control files begin with "/" (or "drive:/" for Win32), the 15 | # server will use that explicit path. If the filenames do *not* begin 16 | # with "/", the value of ServerRoot is prepended -- so "logs/access_log" 17 | # with ServerRoot set to "/usr/local/apache2" will be interpreted by the 18 | # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" 19 | # will be interpreted as '/logs/access_log'. 20 | 21 | # 22 | # ServerTokens 23 | # This directive configures what you return as the Server HTTP response 24 | # Header. The default is 'Full' which sends information about the OS-Type 25 | # and compiled in modules. 26 | # Set to one of: Full | OS | Minor | Minimal | Major | Prod 27 | # where Full conveys the most information, and Prod the least. 28 | # 29 | ServerTokens OS 30 | 31 | # 32 | # ServerRoot: The top of the directory tree under which the server's 33 | # configuration, error, and log files are kept. 34 | # 35 | # Do not add a slash at the end of the directory path. If you point 36 | # ServerRoot at a non-local disk, be sure to specify a local disk on the 37 | # Mutex directive, if file-based mutexes are used. If you wish to share the 38 | # same ServerRoot for multiple httpd daemons, you will need to change at 39 | # least PidFile. 40 | # 41 | ServerRoot /var/www 42 | 43 | # 44 | # Mutex: Allows you to set the mutex mechanism and mutex file directory 45 | # for individual mutexes, or change the global defaults 46 | # 47 | # Uncomment and change the directory if mutexes are file-based and the default 48 | # mutex file directory is not on a local disk or is not appropriate for some 49 | # other reason. 50 | # 51 | # Mutex default:/run/apache2 52 | 53 | # 54 | # Listen: Allows you to bind Apache to specific IP addresses and/or 55 | # ports, instead of the default. See also the 56 | # directive. 57 | # 58 | # Change this to Listen on specific IP addresses as shown below to 59 | # prevent Apache from glomming onto all bound IP addresses. 60 | # 61 | #Listen 12.34.56.78:80 62 | Listen 8080 63 | 64 | # 65 | # Dynamic Shared Object (DSO) Support 66 | # 67 | # To be able to use the functionality of a module which was built as a DSO you 68 | # have to place corresponding `LoadModule' lines at this location so the 69 | # directives contained in it are actually available _before_ they are used. 70 | # Statically compiled modules (those listed by `httpd -l') do not need 71 | # to be loaded here. 72 | # 73 | # Example: 74 | # LoadModule foo_module modules/mod_foo.so 75 | # 76 | #LoadModule mpm_event_module modules/mod_mpm_event.so 77 | LoadModule mpm_prefork_module modules/mod_mpm_prefork.so 78 | #LoadModule mpm_worker_module modules/mod_mpm_worker.so 79 | LoadModule authn_file_module modules/mod_authn_file.so 80 | #LoadModule authn_dbm_module modules/mod_authn_dbm.so 81 | #LoadModule authn_anon_module modules/mod_authn_anon.so 82 | #LoadModule authn_dbd_module modules/mod_authn_dbd.so 83 | #LoadModule authn_socache_module modules/mod_authn_socache.so 84 | LoadModule authn_core_module modules/mod_authn_core.so 85 | LoadModule authz_host_module modules/mod_authz_host.so 86 | LoadModule authz_groupfile_module modules/mod_authz_groupfile.so 87 | LoadModule authz_user_module modules/mod_authz_user.so 88 | #LoadModule authz_dbm_module modules/mod_authz_dbm.so 89 | #LoadModule authz_owner_module modules/mod_authz_owner.so 90 | #LoadModule authz_dbd_module modules/mod_authz_dbd.so 91 | LoadModule authz_core_module modules/mod_authz_core.so 92 | LoadModule access_compat_module modules/mod_access_compat.so 93 | LoadModule auth_basic_module modules/mod_auth_basic.so 94 | #LoadModule auth_form_module modules/mod_auth_form.so 95 | #LoadModule auth_digest_module modules/mod_auth_digest.so 96 | #LoadModule allowmethods_module modules/mod_allowmethods.so 97 | #LoadModule file_cache_module modules/mod_file_cache.so 98 | #LoadModule cache_module modules/mod_cache.so 99 | #LoadModule cache_disk_module modules/mod_cache_disk.so 100 | #LoadModule cache_socache_module modules/mod_cache_socache.so 101 | #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so 102 | #LoadModule socache_dbm_module modules/mod_socache_dbm.so 103 | #LoadModule socache_memcache_module modules/mod_socache_memcache.so 104 | #LoadModule socache_redis_module modules/mod_socache_redis.so 105 | #LoadModule watchdog_module modules/mod_watchdog.so 106 | #LoadModule macro_module modules/mod_macro.so 107 | #LoadModule dbd_module modules/mod_dbd.so 108 | #LoadModule dumpio_module modules/mod_dumpio.so 109 | #LoadModule echo_module modules/mod_echo.so 110 | #LoadModule buffer_module modules/mod_buffer.so 111 | #LoadModule data_module modules/mod_data.so 112 | #LoadModule ratelimit_module modules/mod_ratelimit.so 113 | LoadModule reqtimeout_module modules/mod_reqtimeout.so 114 | #LoadModule ext_filter_module modules/mod_ext_filter.so 115 | #LoadModule request_module modules/mod_request.so 116 | #LoadModule include_module modules/mod_include.so 117 | LoadModule filter_module modules/mod_filter.so 118 | #LoadModule reflector_module modules/mod_reflector.so 119 | #LoadModule substitute_module modules/mod_substitute.so 120 | #LoadModule sed_module modules/mod_sed.so 121 | #LoadModule charset_lite_module modules/mod_charset_lite.so 122 | LoadModule deflate_module modules/mod_deflate.so 123 | LoadModule mime_module modules/mod_mime.so 124 | LoadModule log_config_module modules/mod_log_config.so 125 | #LoadModule log_debug_module modules/mod_log_debug.so 126 | #LoadModule log_forensic_module modules/mod_log_forensic.so 127 | #LoadModule logio_module modules/mod_logio.so 128 | LoadModule env_module modules/mod_env.so 129 | #LoadModule mime_magic_module modules/mod_mime_magic.so 130 | #LoadModule expires_module modules/mod_expires.so 131 | LoadModule headers_module modules/mod_headers.so 132 | #LoadModule usertrack_module modules/mod_usertrack.so 133 | #LoadModule unique_id_module modules/mod_unique_id.so 134 | LoadModule setenvif_module modules/mod_setenvif.so 135 | LoadModule version_module modules/mod_version.so 136 | #LoadModule remoteip_module modules/mod_remoteip.so 137 | LoadModule session_module modules/mod_session.so 138 | LoadModule session_cookie_module modules/mod_session_cookie.so 139 | LoadModule session_crypto_module modules/mod_session_crypto.so 140 | #LoadModule session_dbd_module modules/mod_session_dbd.so 141 | #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so 142 | #LoadModule slotmem_plain_module modules/mod_slotmem_plain.so 143 | #LoadModule dialup_module modules/mod_dialup.so 144 | #LoadModule http2_module modules/mod_http2.so 145 | LoadModule unixd_module modules/mod_unixd.so 146 | #LoadModule heartbeat_module modules/mod_heartbeat.so 147 | #LoadModule heartmonitor_module modules/mod_heartmonitor.so 148 | LoadModule status_module modules/mod_status.so 149 | LoadModule autoindex_module modules/mod_autoindex.so 150 | #LoadModule asis_module modules/mod_asis.so 151 | #LoadModule info_module modules/mod_info.so 152 | #LoadModule suexec_module modules/mod_suexec.so 153 | 154 | #LoadModule cgid_module modules/mod_cgid.so 155 | 156 | 157 | #LoadModule cgi_module modules/mod_cgi.so 158 | 159 | #LoadModule vhost_alias_module modules/mod_vhost_alias.so 160 | #LoadModule negotiation_module modules/mod_negotiation.so 161 | LoadModule dir_module modules/mod_dir.so 162 | #LoadModule actions_module modules/mod_actions.so 163 | #LoadModule speling_module modules/mod_speling.so 164 | #LoadModule userdir_module modules/mod_userdir.so 165 | LoadModule alias_module modules/mod_alias.so 166 | LoadModule rewrite_module modules/mod_rewrite.so 167 | 168 | LoadModule negotiation_module modules/mod_negotiation.so 169 | 170 | 171 | # 172 | # If you wish httpd to run as a different user or group, you must run 173 | # httpd as root initially and it will switch. 174 | # 175 | # User/Group: The name (or #number) of the user/group to run httpd as. 176 | # It is usually good practice to create a dedicated user and group for 177 | # running httpd, as with most system services. 178 | # 179 | User apache 180 | Group apache 181 | 182 | 183 | 184 | # 'Main' server configuration 185 | # 186 | # The directives in this section set up the values used by the 'main' 187 | # server, which responds to any requests that aren't handled by a 188 | # definition. These values also provide defaults for 189 | # any containers you may define later in the file. 190 | # 191 | # All of these directives may appear inside containers, 192 | # in which case these default settings will be overridden for the 193 | # virtual host being defined. 194 | # 195 | 196 | # 197 | # ServerAdmin: Your address, where problems with the server should be 198 | # e-mailed. This address appears on some server-generated pages, such 199 | # as error documents. e.g. admin@your-domain.com 200 | # 201 | ServerAdmin you@example.com 202 | 203 | # 204 | # Optionally add a line containing the server version and virtual host 205 | # name to server-generated pages (internal error documents, FTP directory 206 | # listings, mod_status and mod_info output etc., but not CGI generated 207 | # documents or custom error documents). 208 | # Set to "EMail" to also include a mailto: link to the ServerAdmin. 209 | # Set to one of: On | Off | EMail 210 | # 211 | ServerSignature On 212 | 213 | # 214 | # ServerName gives the name and port that the server uses to identify itself. 215 | # This can often be determined automatically, but we recommend you specify 216 | # it explicitly to prevent problems during startup. 217 | # 218 | # If your host doesn't have a registered DNS name, enter its IP address here. 219 | # 220 | #ServerName www.example.com:80 221 | 222 | # 223 | # Deny access to the entirety of your server's filesystem. You must 224 | # explicitly permit access to web content directories in other 225 | # blocks below. 226 | # 227 | 228 | AllowOverride none 229 | Require all denied 230 | 231 | 232 | # 233 | # Note that from this point forward you must specifically allow 234 | # particular features to be enabled - so if something's not working as 235 | # you might expect, make sure that you have specifically enabled it 236 | # below. 237 | # 238 | 239 | # 240 | # DocumentRoot: The directory out of which you will serve your 241 | # documents. By default, all requests are taken from this directory, but 242 | # symbolic links and aliases may be used to point to other locations. 243 | # 244 | DocumentRoot "/app/public" 245 | 246 | # 247 | # Possible values for the Options directive are "None", "All", 248 | # or any combination of: 249 | # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 250 | # 251 | # Note that "MultiViews" must be named *explicitly* --- "Options All" 252 | # doesn't give it to you. 253 | # 254 | # The Options directive is both complicated and important. Please see 255 | # http://httpd.apache.org/docs/2.4/mod/core.html#options 256 | # for more information. 257 | # 258 | Options Indexes FollowSymLinks 259 | 260 | # 261 | # AllowOverride controls what directives may be placed in .htaccess files. 262 | # It can be "All", "None", or any combination of the keywords: 263 | # AllowOverride FileInfo AuthConfig Limit 264 | # 265 | AllowOverride None 266 | 267 | # 268 | # Controls who can get stuff from this server. 269 | # 270 | Require all granted 271 | 272 | 273 | # 274 | # DirectoryIndex: sets the file that Apache will serve if a directory 275 | # is requested. 276 | # 277 | 278 | DirectoryIndex index.html 279 | 280 | 281 | # 282 | # The following lines prevent .htaccess and .htpasswd files from being 283 | # viewed by Web clients. 284 | # 285 | 286 | Require all denied 287 | 288 | 289 | # 290 | # ErrorLog: The location of the error log file. 291 | # If you do not specify an ErrorLog directive within a 292 | # container, error messages relating to that virtual host will be 293 | # logged here. If you *do* define an error logfile for a 294 | # container, that host's errors will be logged there and not here. 295 | # 296 | ErrorLog /dev/stderr 297 | 298 | # 299 | # LogLevel: Control the number of messages logged to the error_log. 300 | # Possible values include: debug, info, notice, warn, error, crit, 301 | # alert, emerg. 302 | # 303 | LogLevel warn 304 | 305 | 306 | # 307 | # The following directives define some format nicknames for use with 308 | # a CustomLog directive (see below). 309 | # 310 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 311 | LogFormat "%h %l %u %t \"%r\" %>s %b" common 312 | 313 | 314 | # You need to enable mod_logio.c to use %I and %O 315 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio 316 | 317 | 318 | # 319 | # The location and format of the access logfile (Common Logfile Format). 320 | # If you do not define any access logfiles within a 321 | # container, they will be logged here. Contrariwise, if you *do* 322 | # define per- access logfiles, transactions will be 323 | # logged therein and *not* in this file. 324 | # 325 | #CustomLog logs/access.log common 326 | 327 | # 328 | # If you prefer a logfile with access, agent, and referer information 329 | # (Combined Logfile Format) you can use the following directive. 330 | # 331 | CustomLog /dev/stdout combined 332 | 333 | 334 | 335 | # 336 | # Redirect: Allows you to tell clients about documents that used to 337 | # exist in your server's namespace, but do not anymore. The client 338 | # will make a new request for the document at its new location. 339 | # Example: 340 | # Redirect permanent /foo http://www.example.com/bar 341 | 342 | # 343 | # Alias: Maps web paths into filesystem paths and is used to 344 | # access content that does not live under the DocumentRoot. 345 | # Example: 346 | # Alias /webpath /full/filesystem/path 347 | # 348 | # If you include a trailing / on /webpath then the server will 349 | # require it to be present in the URL. You will also likely 350 | # need to provide a section to allow access to 351 | # the filesystem path. 352 | 353 | # 354 | # ScriptAlias: This controls which directories contain server scripts. 355 | # ScriptAliases are essentially the same as Aliases, except that 356 | # documents in the target directory are treated as applications and 357 | # run by the server when requested rather than as documents sent to the 358 | # client. The same rules about trailing "/" apply to ScriptAlias 359 | # directives as to Alias. 360 | # 361 | ScriptAlias /cgi-bin/ "/var/www/localhost/cgi-bin/" 362 | 363 | 364 | 365 | 366 | # 367 | # ScriptSock: On threaded servers, designate the path to the UNIX 368 | # socket used to communicate with the CGI daemon of mod_cgid. 369 | # 370 | #Scriptsock cgisock 371 | 372 | 373 | # 374 | # "/var/www/localhost/cgi-bin" should be changed to whatever your ScriptAliased 375 | # CGI directory exists, if you have that configured. 376 | # 377 | 378 | AllowOverride None 379 | Options None 380 | Require all granted 381 | 382 | 383 | 384 | # 385 | # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied 386 | # backend servers which have lingering "httpoxy" defects. 387 | # 'Proxy' request header is undefined by the IETF, not listed by IANA 388 | # 389 | RequestHeader unset Proxy early 390 | 391 | 392 | 393 | # 394 | # TypesConfig points to the file containing the list of mappings from 395 | # filename extension to MIME-type. 396 | # 397 | TypesConfig /etc/apache2/mime.types 398 | 399 | # 400 | # AddType allows you to add to or override the MIME configuration 401 | # file specified in TypesConfig for specific file types. 402 | # 403 | #AddType application/x-gzip .tgz 404 | # 405 | # AddEncoding allows you to have certain browsers uncompress 406 | # information on the fly. Note: Not all browsers support this. 407 | # 408 | #AddEncoding x-compress .Z 409 | #AddEncoding x-gzip .gz .tgz 410 | # 411 | # If the AddEncoding directives above are commented-out, then you 412 | # probably should define those extensions to indicate media types: 413 | # 414 | AddType application/x-compress .Z 415 | AddType application/x-gzip .gz .tgz 416 | 417 | # 418 | # AddHandler allows you to map certain file extensions to "handlers": 419 | # actions unrelated to filetype. These can be either built into the server 420 | # or added with the Action directive (see below) 421 | # 422 | # To use CGI scripts outside of ScriptAliased directories: 423 | # (You will also need to add "ExecCGI" to the "Options" directive.) 424 | # 425 | #AddHandler cgi-script .cgi 426 | 427 | # For type maps (negotiated resources): 428 | #AddHandler type-map var 429 | 430 | # 431 | # Filters allow you to process content before it is sent to the client. 432 | # 433 | # To parse .shtml files for server-side includes (SSI): 434 | # (You will also need to add "Includes" to the "Options" directive.) 435 | # 436 | #AddType text/html .shtml 437 | #AddOutputFilter INCLUDES .shtml 438 | 439 | 440 | # 441 | # The mod_mime_magic module allows the server to use various hints from the 442 | # contents of the file itself to determine its type. The MIMEMagicFile 443 | # directive tells the module where the hint definitions are located. 444 | # 445 | 446 | MIMEMagicFile /etc/apache2/magic 447 | 448 | 449 | # 450 | # Customizable error responses come in three flavors: 451 | # 1) plain text 2) local redirects 3) external redirects 452 | # 453 | # Some examples: 454 | #ErrorDocument 500 "The server made a boo boo." 455 | #ErrorDocument 404 /missing.html 456 | #ErrorDocument 404 "/cgi-bin/missing_handler.pl" 457 | #ErrorDocument 402 http://www.example.com/subscription_info.html 458 | # 459 | 460 | # 461 | # MaxRanges: Maximum number of Ranges in a request before 462 | # returning the entire resource, or one of the special 463 | # values 'default', 'none' or 'unlimited'. 464 | # Default setting is to accept 200 Ranges. 465 | #MaxRanges unlimited 466 | 467 | # 468 | # EnableMMAP and EnableSendfile: On systems that support it, 469 | # memory-mapping or the sendfile syscall may be used to deliver 470 | # files. This usually improves server performance, but must 471 | # be turned off when serving from networked-mounted 472 | # filesystems or if support for these functions is otherwise 473 | # broken on your system. 474 | # Defaults: EnableMMAP On, EnableSendfile Off 475 | # 476 | #EnableMMAP off 477 | #EnableSendfile on 478 | 479 | # Load config files from the config directory "/etc/apache2/conf.d". 480 | # 481 | IncludeOptional /etc/apache2/conf.d/*.conf 482 | 483 | 484 | AllowOverride All 485 | 486 | 487 | PidFile /tmp/apache.pid 488 | -------------------------------------------------------------------------------- /laravel/.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 | -------------------------------------------------------------------------------- /laravel/.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY=base64:i8C59nzGtTlrJ7f9CSpKyFskniG1X7mCf9CMWiI1Iow= 4 | APP_DEBUG=true 5 | APP_URL=http://laravel-2.test 6 | 7 | LOG_CHANNEL=stack 8 | LOG_LEVEL=debug 9 | 10 | DB_CONNECTION=mysql 11 | DB_HOST=mariadb 12 | DB_PORT=3306 13 | DB_DATABASE=database 14 | DB_USERNAME=user 15 | DB_PASSWORD=pass 16 | 17 | BROADCAST_DRIVER=log 18 | CACHE_DRIVER=file 19 | QUEUE_CONNECTION=sync 20 | SESSION_DRIVER=file 21 | SESSION_LIFETIME=120 22 | 23 | REDIS_HOST=redis 24 | REDIS_PASSWORD=null 25 | REDIS_PORT=6379 26 | 27 | MAIL_MAILER=smtp 28 | MAIL_HOST=smtp.mailtrap.io 29 | MAIL_PORT=2525 30 | MAIL_USERNAME=null 31 | MAIL_PASSWORD=null 32 | MAIL_ENCRYPTION=null 33 | MAIL_FROM_ADDRESS=null 34 | MAIL_FROM_NAME="${APP_NAME}" 35 | 36 | AWS_ACCESS_KEY_ID= 37 | AWS_SECRET_ACCESS_KEY= 38 | AWS_DEFAULT_REGION=us-east-1 39 | AWS_BUCKET= 40 | 41 | PUSHER_APP_ID= 42 | PUSHER_APP_KEY= 43 | PUSHER_APP_SECRET= 44 | PUSHER_APP_CLUSTER=mt1 45 | 46 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 47 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 48 | -------------------------------------------------------------------------------- /laravel/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /laravel/.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 | Homestead.json 10 | Homestead.yaml 11 | npm-debug.log 12 | yarn-error.log 13 | -------------------------------------------------------------------------------- /laravel/.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - no_unused_imports 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | not-name: 12 | - webpack.mix.js 13 | css: true 14 | -------------------------------------------------------------------------------- /laravel/app/Console/Kernel.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 | -------------------------------------------------------------------------------- /laravel/app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | get(); 52 | return response()->json($model); 53 | } 54 | 55 | /** 56 | * @OA\Post( 57 | * path="/examples", 58 | * operationId="exampleCreate", 59 | * tags={"Examples"}, 60 | * summary="Create yet another example record", 61 | * security={ 62 | * {"api_key": {}}, 63 | * }, 64 | * @OA\Response( 65 | * response="200", 66 | * description="Everything is fine", 67 | * @OA\JsonContent(ref="#/components/schemas/ExampleShowRequest") 68 | * ), 69 | * @OA\RequestBody( 70 | * required=true, 71 | * @OA\JsonContent(ref="#/components/schemas/ExampleStoreRequest") 72 | * ), 73 | * ) 74 | * Store a newly created resource in storage. 75 | * 76 | * @param \App\Http\Requests\ExampleStoreRequest $request 77 | * 78 | * @return \Illuminate\Http\JsonResponse 79 | */ 80 | public function store(ExampleStoreRequest $request): JsonResponse 81 | { 82 | $model = new Example(); 83 | $model->fill($request->all()); 84 | $model->save(); 85 | 86 | return response()->json($model); 87 | } 88 | 89 | /** 90 | * @OA\Get( 91 | * path="/examples/{id}", 92 | * operationId="examplesGet", 93 | * tags={"Examples"}, 94 | * summary="Get example by ID", 95 | * security={ 96 | * {"api_key": {}}, 97 | * }, 98 | * @OA\Parameter( 99 | * name="id", 100 | * in="path", 101 | * description="The ID of example", 102 | * required=true, 103 | * example="1", 104 | * @OA\Schema( 105 | * type="integer", 106 | * ), 107 | * ), 108 | * @OA\Response( 109 | * response="200", 110 | * description="Everything is fine", 111 | * @OA\JsonContent(ref="#/components/schemas/ExampleShowRequest") 112 | * ), 113 | * ) 114 | * 115 | * Display a listing of the resource. 116 | * 117 | * @param int $id 118 | * 119 | * @return \Illuminate\Http\JsonResponse 120 | */ 121 | public function show(int $id): JsonResponse 122 | { 123 | $model = Example::query()->findOrFail($id); 124 | return response()->json($model); 125 | } 126 | 127 | /** 128 | * @OA\Put( 129 | * path="/examples/{id}", 130 | * operationId="examplesUpdate", 131 | * tags={"Examples"}, 132 | * summary="Update example by ID", 133 | * security={ 134 | * {"api_key": {}}, 135 | * }, 136 | * @OA\Parameter( 137 | * name="id", 138 | * in="path", 139 | * description="The ID of example", 140 | * required=true, 141 | * example="1", 142 | * @OA\Schema( 143 | * type="integer", 144 | * ), 145 | * ), 146 | * @OA\Response( 147 | * response="200", 148 | * description="Everything is fine", 149 | * @OA\JsonContent(ref="#/components/schemas/ExampleShowRequest") 150 | * ), 151 | * @OA\RequestBody( 152 | * required=true, 153 | * @OA\JsonContent(ref="#/components/schemas/ExampleStoreRequest") 154 | * ), 155 | * ) 156 | * 157 | * Update the specified resource in storage. 158 | * 159 | * @param \Illuminate\Http\Request $request 160 | * @param int $id 161 | * 162 | * @return \Illuminate\Http\JsonResponse 163 | */ 164 | public function update(Request $request, int $id): JsonResponse 165 | { 166 | $params = $request->all(); 167 | $model = Example::query()->findOrFail($id); 168 | $model->fill($params); 169 | $model->save(); 170 | 171 | return response()->json($model); 172 | } 173 | 174 | /** 175 | * @OA\Delete( 176 | * path="/examples/{id}", 177 | * operationId="examplesDelete", 178 | * tags={"Examples"}, 179 | * summary="Delete example by ID", 180 | * security={ 181 | * {"api_key": {}}, 182 | * }, 183 | * @OA\Parameter( 184 | * name="id", 185 | * in="path", 186 | * description="The ID of example", 187 | * required=true, 188 | * example="1", 189 | * @OA\Schema( 190 | * type="integer", 191 | * ), 192 | * ), 193 | * @OA\Response( 194 | * response="202", 195 | * description="Deleted", 196 | * ), 197 | * ) 198 | * 199 | * Remove the specified resource from storage. 200 | * 201 | * @param int $id 202 | * 203 | * @return \Illuminate\Http\Response 204 | * @throws \Exception 205 | */ 206 | public function destroy(int $id): Response 207 | { 208 | $model = Example::query()->findOrFail($id); 209 | $model->delete(); 210 | 211 | return response(null, HttpResponse::HTTP_ACCEPTED); 212 | } 213 | } 214 | -------------------------------------------------------------------------------- /laravel/app/Http/Controllers/Controller.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 | 'throttle:api', 44 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 45 | ], 46 | ]; 47 | 48 | /** 49 | * The application's route middleware. 50 | * 51 | * These middleware may be assigned to groups or used individually. 52 | * 53 | * @var array 54 | */ 55 | protected $routeMiddleware = [ 56 | 'auth' => \App\Http\Middleware\Authenticate::class, 57 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 58 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 59 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 60 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 61 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 62 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 63 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 64 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 65 | ]; 66 | } 67 | -------------------------------------------------------------------------------- /laravel/app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /laravel/app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /laravel/app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /laravel/app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | 'required|min:3', 28 | 'value' => 'required|min:3', 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /laravel/app/Models/Example.php: -------------------------------------------------------------------------------- 1 | 'datetime', 42 | ]; 43 | } 44 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/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); 61 | }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /laravel/app/Virtual/ExampleShowRequest.php: -------------------------------------------------------------------------------- 1 | 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 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /laravel/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.3", 12 | "barryvdh/laravel-ide-helper": "^2.8", 13 | "darkaonline/l5-swagger": "^8.0", 14 | "fideloper/proxy": "^4.2", 15 | "fruitcake/laravel-cors": "^2.0", 16 | "guzzlehttp/guzzle": "^7.0.1", 17 | "laravel/framework": "^8.0", 18 | "laravel/tinker": "^2.0" 19 | }, 20 | "require-dev": { 21 | "facade/ignition": "^2.3.6", 22 | "fzaninotto/faker": "^1.9.1", 23 | "mockery/mockery": "^1.3.1", 24 | "nunomaduro/collision": "^5.0", 25 | "phpunit/phpunit": "^9.3" 26 | }, 27 | "config": { 28 | "optimize-autoloader": true, 29 | "preferred-install": "dist", 30 | "sort-packages": true 31 | }, 32 | "extra": { 33 | "laravel": { 34 | "dont-discover": [] 35 | } 36 | }, 37 | "autoload": { 38 | "psr-4": { 39 | "App\\": "app/", 40 | "Database\\Factories\\": "database/factories/", 41 | "Database\\Seeders\\": "database/seeders/" 42 | } 43 | }, 44 | "autoload-dev": { 45 | "psr-4": { 46 | "Tests\\": "tests/" 47 | } 48 | }, 49 | "minimum-stability": "dev", 50 | "prefer-stable": true, 51 | "scripts": { 52 | "post-autoload-dump": [ 53 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 54 | "@php artisan package:discover --ansi" 55 | ], 56 | "post-root-package-install": [ 57 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 58 | ], 59 | "post-create-project-cmd": [ 60 | "@php artisan key:generate --ansi" 61 | ] 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /laravel/config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Laravel'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application Environment 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This value determines the "environment" your application is currently 24 | | running in. This may determine how you prefer to configure various 25 | | services the application utilizes. Set this in your ".env" file. 26 | | 27 | */ 28 | 29 | 'env' => env('APP_ENV', 'production'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Debug Mode 34 | |-------------------------------------------------------------------------- 35 | | 36 | | When your application is in debug mode, detailed error messages with 37 | | stack traces will be shown on every error that occurs within your 38 | | application. If disabled, a simple generic error page is shown. 39 | | 40 | */ 41 | 42 | 'debug' => (bool) env('APP_DEBUG', false), 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application URL 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This URL is used by the console to properly generate URLs when using 50 | | the Artisan command line tool. You should set this to the root of 51 | | your application so that it is used when running Artisan tasks. 52 | | 53 | */ 54 | 55 | 'url' => env('APP_URL', 'http://localhost'), 56 | 57 | 'asset_url' => env('ASSET_URL', null), 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | Application Timezone 62 | |-------------------------------------------------------------------------- 63 | | 64 | | Here you may specify the default timezone for your application, which 65 | | will be used by the PHP date and date-time functions. We have gone 66 | | ahead and set this to a sensible default for you out of the box. 67 | | 68 | */ 69 | 70 | 'timezone' => 'UTC', 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Application Locale Configuration 75 | |-------------------------------------------------------------------------- 76 | | 77 | | The application locale determines the default locale that will be used 78 | | by the translation service provider. You are free to set this value 79 | | to any of the locales which will be supported by the application. 80 | | 81 | */ 82 | 83 | 'locale' => 'en', 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | Application Fallback Locale 88 | |-------------------------------------------------------------------------- 89 | | 90 | | The fallback locale determines the locale to use when the current one 91 | | is not available. You may change the value to correspond to any of 92 | | the language folders that are provided through your application. 93 | | 94 | */ 95 | 96 | 'fallback_locale' => 'en', 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Faker Locale 101 | |-------------------------------------------------------------------------- 102 | | 103 | | This locale will be used by the Faker PHP library when generating fake 104 | | data for your database seeds. For example, this will be used to get 105 | | localized telephone numbers, street address information and more. 106 | | 107 | */ 108 | 109 | 'faker_locale' => 'en_US', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Encryption Key 114 | |-------------------------------------------------------------------------- 115 | | 116 | | This key is used by the Illuminate encrypter service and should be set 117 | | to a random, 32 character string, otherwise these encrypted strings 118 | | will not be safe. Please do this before deploying an application! 119 | | 120 | */ 121 | 122 | 'key' => env('APP_KEY'), 123 | 124 | 'cipher' => 'AES-256-CBC', 125 | 126 | /* 127 | |-------------------------------------------------------------------------- 128 | | Autoloaded Service Providers 129 | |-------------------------------------------------------------------------- 130 | | 131 | | The service providers listed here will be automatically loaded on the 132 | | request to your application. Feel free to add your own services to 133 | | this array to grant expanded functionality to your applications. 134 | | 135 | */ 136 | 137 | 'providers' => [ 138 | 139 | /* 140 | * Laravel Framework Service Providers... 141 | */ 142 | Illuminate\Auth\AuthServiceProvider::class, 143 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 144 | Illuminate\Bus\BusServiceProvider::class, 145 | Illuminate\Cache\CacheServiceProvider::class, 146 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 147 | Illuminate\Cookie\CookieServiceProvider::class, 148 | Illuminate\Database\DatabaseServiceProvider::class, 149 | Illuminate\Encryption\EncryptionServiceProvider::class, 150 | Illuminate\Filesystem\FilesystemServiceProvider::class, 151 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 152 | Illuminate\Hashing\HashServiceProvider::class, 153 | Illuminate\Mail\MailServiceProvider::class, 154 | Illuminate\Notifications\NotificationServiceProvider::class, 155 | Illuminate\Pagination\PaginationServiceProvider::class, 156 | Illuminate\Pipeline\PipelineServiceProvider::class, 157 | Illuminate\Queue\QueueServiceProvider::class, 158 | Illuminate\Redis\RedisServiceProvider::class, 159 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 160 | Illuminate\Session\SessionServiceProvider::class, 161 | Illuminate\Translation\TranslationServiceProvider::class, 162 | Illuminate\Validation\ValidationServiceProvider::class, 163 | Illuminate\View\ViewServiceProvider::class, 164 | 165 | /* 166 | * Package Service Providers... 167 | */ 168 | 169 | /* 170 | * Application Service Providers... 171 | */ 172 | App\Providers\AppServiceProvider::class, 173 | App\Providers\AuthServiceProvider::class, 174 | // App\Providers\BroadcastServiceProvider::class, 175 | App\Providers\EventServiceProvider::class, 176 | App\Providers\RouteServiceProvider::class, 177 | 178 | ], 179 | 180 | /* 181 | |-------------------------------------------------------------------------- 182 | | Class Aliases 183 | |-------------------------------------------------------------------------- 184 | | 185 | | This array of class aliases will be registered when this application 186 | | is started. However, feel free to register as many as you wish as 187 | | the aliases are "lazy" loaded so they don't hinder performance. 188 | | 189 | */ 190 | 191 | 'aliases' => [ 192 | 193 | 'App' => Illuminate\Support\Facades\App::class, 194 | 'Arr' => Illuminate\Support\Arr::class, 195 | 'Artisan' => Illuminate\Support\Facades\Artisan::class, 196 | 'Auth' => Illuminate\Support\Facades\Auth::class, 197 | 'Blade' => Illuminate\Support\Facades\Blade::class, 198 | 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, 199 | 'Bus' => Illuminate\Support\Facades\Bus::class, 200 | 'Cache' => Illuminate\Support\Facades\Cache::class, 201 | 'Config' => Illuminate\Support\Facades\Config::class, 202 | 'Cookie' => Illuminate\Support\Facades\Cookie::class, 203 | 'Crypt' => Illuminate\Support\Facades\Crypt::class, 204 | 'DB' => Illuminate\Support\Facades\DB::class, 205 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 206 | 'Event' => Illuminate\Support\Facades\Event::class, 207 | 'File' => Illuminate\Support\Facades\File::class, 208 | 'Gate' => Illuminate\Support\Facades\Gate::class, 209 | 'Hash' => Illuminate\Support\Facades\Hash::class, 210 | 'Http' => Illuminate\Support\Facades\Http::class, 211 | 'Lang' => Illuminate\Support\Facades\Lang::class, 212 | 'Log' => Illuminate\Support\Facades\Log::class, 213 | 'Mail' => Illuminate\Support\Facades\Mail::class, 214 | 'Notification' => Illuminate\Support\Facades\Notification::class, 215 | 'Password' => Illuminate\Support\Facades\Password::class, 216 | 'Queue' => Illuminate\Support\Facades\Queue::class, 217 | 'Redirect' => Illuminate\Support\Facades\Redirect::class, 218 | 'Redis' => Illuminate\Support\Facades\Redis::class, 219 | 'Request' => Illuminate\Support\Facades\Request::class, 220 | 'Response' => Illuminate\Support\Facades\Response::class, 221 | 'Route' => Illuminate\Support\Facades\Route::class, 222 | 'Schema' => Illuminate\Support\Facades\Schema::class, 223 | 'Session' => Illuminate\Support\Facades\Session::class, 224 | 'Storage' => Illuminate\Support\Facades\Storage::class, 225 | 'Str' => Illuminate\Support\Str::class, 226 | 'URL' => Illuminate\Support\Facades\URL::class, 227 | 'Validator' => Illuminate\Support\Facades\Validator::class, 228 | 'View' => Illuminate\Support\Facades\View::class, 229 | 230 | ], 231 | 232 | ]; 233 | -------------------------------------------------------------------------------- /laravel/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", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | 'hash' => false, 48 | ], 49 | ], 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | User Providers 54 | |-------------------------------------------------------------------------- 55 | | 56 | | All authentication drivers have a user provider. This defines how the 57 | | users are actually retrieved out of your database or other storage 58 | | mechanisms used by this application to persist your user's data. 59 | | 60 | | If you have multiple user tables or models you may configure multiple 61 | | sources which represent each model / table. These sources may then 62 | | be assigned to any extra authentication guards you have defined. 63 | | 64 | | Supported: "database", "eloquent" 65 | | 66 | */ 67 | 68 | 'providers' => [ 69 | 'users' => [ 70 | 'driver' => 'eloquent', 71 | 'model' => App\Models\User::class, 72 | ], 73 | 74 | // 'users' => [ 75 | // 'driver' => 'database', 76 | // 'table' => 'users', 77 | // ], 78 | ], 79 | 80 | /* 81 | |-------------------------------------------------------------------------- 82 | | Resetting Passwords 83 | |-------------------------------------------------------------------------- 84 | | 85 | | You may specify multiple password reset configurations if you have more 86 | | than one user table or model in the application and you want to have 87 | | separate password reset settings based on the specific user types. 88 | | 89 | | The expire time is the number of minutes that the reset token should be 90 | | considered valid. This security feature keeps tokens short-lived so 91 | | they have less time to be guessed. You may change this as needed. 92 | | 93 | */ 94 | 95 | 'passwords' => [ 96 | 'users' => [ 97 | 'provider' => 'users', 98 | 'table' => 'password_resets', 99 | 'expire' => 60, 100 | 'throttle' => 60, 101 | ], 102 | ], 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Password Confirmation Timeout 107 | |-------------------------------------------------------------------------- 108 | | 109 | | Here you may define the amount of seconds before a password confirmation 110 | | times out and the user is prompted to re-enter their password via the 111 | | confirmation screen. By default, the timeout lasts for three hours. 112 | | 113 | */ 114 | 115 | 'password_timeout' => 10800, 116 | 117 | ]; 118 | -------------------------------------------------------------------------------- /laravel/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 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /laravel/config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Cache Stores 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may define all of the cache "stores" for your application as 29 | | well as their drivers. You may even define multiple stores for the 30 | | same cache driver to group types of items stored in your caches. 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 | ], 50 | 51 | 'file' => [ 52 | 'driver' => 'file', 53 | 'path' => storage_path('framework/cache/data'), 54 | ], 55 | 56 | 'memcached' => [ 57 | 'driver' => 'memcached', 58 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 59 | 'sasl' => [ 60 | env('MEMCACHED_USERNAME'), 61 | env('MEMCACHED_PASSWORD'), 62 | ], 63 | 'options' => [ 64 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 65 | ], 66 | 'servers' => [ 67 | [ 68 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 69 | 'port' => env('MEMCACHED_PORT', 11211), 70 | 'weight' => 100, 71 | ], 72 | ], 73 | ], 74 | 75 | 'redis' => [ 76 | 'driver' => 'redis', 77 | 'connection' => 'cache', 78 | ], 79 | 80 | 'dynamodb' => [ 81 | 'driver' => 'dynamodb', 82 | 'key' => env('AWS_ACCESS_KEY_ID'), 83 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 84 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 85 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 86 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 87 | ], 88 | 89 | ], 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Cache Key Prefix 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When utilizing a RAM based store such as APC or Memcached, there might 97 | | be other applications utilizing the same cache. So, we'll specify a 98 | | value to get prefixed to all our keys so we can avoid collisions. 99 | | 100 | */ 101 | 102 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 103 | 104 | ]; 105 | -------------------------------------------------------------------------------- /laravel/config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*'], 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 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "sftp", "s3" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | 'url' => env('AWS_URL'), 65 | 'endpoint' => env('AWS_ENDPOINT'), 66 | ], 67 | 68 | ], 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Symbolic Links 73 | |-------------------------------------------------------------------------- 74 | | 75 | | Here you may configure the symbolic links that will be created when the 76 | | `storage:link` Artisan command is executed. The array keys should be 77 | | the locations of the links and the values should be their targets. 78 | | 79 | */ 80 | 81 | 'links' => [ 82 | public_path('storage') => storage_path('app/public'), 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/config/l5-swagger.php: -------------------------------------------------------------------------------- 1 | 'default', 5 | 'documentations' => [ 6 | 'default' => [ 7 | 'api' => [ 8 | 'title' => 'L5 Swagger UI', 9 | ], 10 | 11 | 'routes' => [ 12 | /* 13 | * Route for accessing api documentation interface 14 | */ 15 | 'api' => 'api/documentation', 16 | ], 17 | 'paths' => [ 18 | /* 19 | * File name of the generated json documentation file 20 | */ 21 | 'docs_json' => 'api-docs.json', 22 | 23 | /* 24 | * File name of the generated YAML documentation file 25 | */ 26 | 'docs_yaml' => 'api-docs.yaml', 27 | 28 | /* 29 | * Absolute paths to directory containing the swagger annotations are stored. 30 | */ 31 | 'annotations' => [ 32 | base_path('app'), 33 | ], 34 | 35 | ], 36 | ], 37 | ], 38 | 'defaults' => [ 39 | 'routes' => [ 40 | /* 41 | * Route for accessing parsed swagger annotations. 42 | */ 43 | 'docs' => 'docs', 44 | 45 | /* 46 | * Route for Oauth2 authentication callback. 47 | */ 48 | 'oauth2_callback' => 'api/oauth2-callback', 49 | 50 | /* 51 | * Middleware allows to prevent unexpected access to API documentation 52 | */ 53 | 'middleware' => [ 54 | 'api' => [], 55 | 'asset' => [], 56 | 'docs' => [], 57 | 'oauth2_callback' => [], 58 | ], 59 | 60 | /* 61 | * Route Group options 62 | */ 63 | 'group_options' => [], 64 | ], 65 | 66 | 'paths' => [ 67 | /* 68 | * Absolute path to location where parsed annotations will be stored 69 | */ 70 | 'docs' => storage_path('api-docs'), 71 | 72 | /* 73 | * Absolute path to directory where to export views 74 | */ 75 | 'views' => base_path('resources/views/vendor/l5-swagger'), 76 | 77 | /* 78 | * Edit to set the api's base path 79 | */ 80 | 'base' => env('L5_SWAGGER_BASE_PATH', null), 81 | 82 | /* 83 | * Edit to set path where swagger ui assets should be stored 84 | */ 85 | 'swagger_ui_assets_path' => env('L5_SWAGGER_UI_ASSETS_PATH', 'vendor/swagger-api/swagger-ui/dist/'), 86 | 87 | /* 88 | * Absolute path to directories that should be exclude from scanning 89 | */ 90 | 'excludes' => [], 91 | ], 92 | 93 | /* 94 | * API security definitions. Will be generated into documentation file. 95 | */ 96 | 'securityDefinitions' => [ 97 | 'securitySchemes' => [ 98 | /* 99 | * Examples of Security schemes 100 | */ 101 | /* 102 | 'api_key_security_example' => [ // Unique name of security 103 | 'type' => 'apiKey', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". 104 | 'description' => 'A short description for security scheme', 105 | 'name' => 'api_key', // The name of the header or query parameter to be used. 106 | 'in' => 'header', // The location of the API key. Valid values are "query" or "header". 107 | ], 108 | 'oauth2_security_example' => [ // Unique name of security 109 | 'type' => 'oauth2', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". 110 | 'description' => 'A short description for oauth2 security scheme.', 111 | 'flow' => 'implicit', // The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode". 112 | 'authorizationUrl' => 'http://example.com/auth', // The authorization URL to be used for (implicit/accessCode) 113 | //'tokenUrl' => 'http://example.com/auth' // The authorization URL to be used for (password/application/accessCode) 114 | 'scopes' => [ 115 | 'read:projects' => 'read your projects', 116 | 'write:projects' => 'modify projects in your account', 117 | ] 118 | ], 119 | */ 120 | 121 | /* Open API 3.0 support 122 | 'passport' => [ // Unique name of security 123 | 'type' => 'oauth2', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". 124 | 'description' => 'Laravel passport oauth2 security.', 125 | 'in' => 'header', 126 | 'scheme' => 'https', 127 | 'flows' => [ 128 | "password" => [ 129 | "authorizationUrl" => config('app.url') . '/oauth/authorize', 130 | "tokenUrl" => config('app.url') . '/oauth/token', 131 | "refreshUrl" => config('app.url') . '/token/refresh', 132 | "scopes" => [] 133 | ], 134 | ], 135 | ], 136 | */ 137 | ], 138 | 'security' => [ 139 | /* 140 | * Examples of Securities 141 | */ 142 | [ 143 | /* 144 | 'oauth2_security_example' => [ 145 | 'read', 146 | 'write' 147 | ], 148 | 149 | 'passport' => [] 150 | */ 151 | ], 152 | ], 153 | ], 154 | 155 | /* 156 | * Set this to `true` in development mode so that docs would be regenerated on each request 157 | * Set this to `false` to disable swagger generation on production 158 | */ 159 | 'generate_always' => env('L5_SWAGGER_GENERATE_ALWAYS', false), 160 | 161 | /* 162 | * Set this to `true` to generate a copy of documentation in yaml format 163 | */ 164 | 'generate_yaml_copy' => env('L5_SWAGGER_GENERATE_YAML_COPY', false), 165 | 166 | /* 167 | * Edit to trust the proxy's ip address - needed for AWS Load Balancer 168 | * string[] 169 | */ 170 | 'proxy' => false, 171 | 172 | /* 173 | * Configs plugin allows to fetch external configs instead of passing them to SwaggerUIBundle. 174 | * See more at: https://github.com/swagger-api/swagger-ui#configs-plugin 175 | */ 176 | 'additional_config_url' => null, 177 | 178 | /* 179 | * Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 180 | * 'method' (sort by HTTP method). 181 | * Default is the order returned by the server unchanged. 182 | */ 183 | 'operations_sort' => env('L5_SWAGGER_OPERATIONS_SORT', null), 184 | 185 | /* 186 | * Pass the validatorUrl parameter to SwaggerUi init on the JS side. 187 | * A null value here disables validation. 188 | */ 189 | 'validator_url' => null, 190 | 191 | /* 192 | * Uncomment to add constants which can be used in annotations 193 | */ 194 | // 'constants' => [ 195 | // 'L5_SWAGGER_CONST_HOST' => env('L5_SWAGGER_CONST_HOST', 'http://my-default-host.com'), 196 | // ], 197 | ], 198 | ]; 199 | -------------------------------------------------------------------------------- /laravel/config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Log Channels 25 | |-------------------------------------------------------------------------- 26 | | 27 | | Here you may configure the log channels for your application. Out of 28 | | the box, Laravel uses the Monolog PHP logging library. This gives 29 | | you a variety of powerful log handlers / formatters to utilize. 30 | | 31 | | Available Drivers: "single", "daily", "slack", "syslog", 32 | | "errorlog", "monolog", 33 | | "custom", "stack" 34 | | 35 | */ 36 | 37 | 'channels' => [ 38 | 'stack' => [ 39 | 'driver' => 'stack', 40 | 'channels' => ['single'], 41 | 'ignore_exceptions' => false, 42 | ], 43 | 44 | 'single' => [ 45 | 'driver' => 'single', 46 | 'path' => storage_path('logs/laravel.log'), 47 | 'level' => env('LOG_LEVEL', 'debug'), 48 | ], 49 | 50 | 'daily' => [ 51 | 'driver' => 'daily', 52 | 'path' => storage_path('logs/laravel.log'), 53 | 'level' => env('LOG_LEVEL', 'debug'), 54 | 'days' => 14, 55 | ], 56 | 57 | 'slack' => [ 58 | 'driver' => 'slack', 59 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 60 | 'username' => 'Laravel Log', 61 | 'emoji' => ':boom:', 62 | 'level' => env('LOG_LEVEL', 'critical'), 63 | ], 64 | 65 | 'papertrail' => [ 66 | 'driver' => 'monolog', 67 | 'level' => env('LOG_LEVEL', 'debug'), 68 | 'handler' => SyslogUdpHandler::class, 69 | 'handler_with' => [ 70 | 'host' => env('PAPERTRAIL_URL'), 71 | 'port' => env('PAPERTRAIL_PORT'), 72 | ], 73 | ], 74 | 75 | 'stderr' => [ 76 | 'driver' => 'monolog', 77 | 'handler' => StreamHandler::class, 78 | 'formatter' => env('LOG_STDERR_FORMATTER'), 79 | 'with' => [ 80 | 'stream' => 'php://stderr', 81 | ], 82 | ], 83 | 84 | 'syslog' => [ 85 | 'driver' => 'syslog', 86 | 'level' => env('LOG_LEVEL', 'debug'), 87 | ], 88 | 89 | 'errorlog' => [ 90 | 'driver' => 'errorlog', 91 | 'level' => env('LOG_LEVEL', 'debug'), 92 | ], 93 | 94 | 'null' => [ 95 | 'driver' => 'monolog', 96 | 'handler' => NullHandler::class, 97 | ], 98 | 99 | 'emergency' => [ 100 | 'path' => storage_path('logs/laravel.log'), 101 | ], 102 | ], 103 | 104 | ]; 105 | -------------------------------------------------------------------------------- /laravel/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" 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 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Global "From" Address 78 | |-------------------------------------------------------------------------- 79 | | 80 | | You may wish for all e-mails sent by your application to be sent from 81 | | the same address. Here, you may specify a name and address that is 82 | | used globally for all e-mails that are sent by your application. 83 | | 84 | */ 85 | 86 | 'from' => [ 87 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 88 | 'name' => env('MAIL_FROM_NAME', 'Example'), 89 | ], 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Markdown Mail Settings 94 | |-------------------------------------------------------------------------- 95 | | 96 | | If you are using Markdown based email rendering, you may configure your 97 | | theme and component paths here, allowing you to customize the design 98 | | of the emails. Or, you may simply stick with the Laravel defaults! 99 | | 100 | */ 101 | 102 | 'markdown' => [ 103 | 'theme' => 'default', 104 | 105 | 'paths' => [ 106 | resource_path('views/vendor/mail'), 107 | ], 108 | ], 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /laravel/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 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'suffix' => env('SQS_SUFFIX'), 59 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 60 | ], 61 | 62 | 'redis' => [ 63 | 'driver' => 'redis', 64 | 'connection' => 'default', 65 | 'queue' => env('REDIS_QUEUE', 'default'), 66 | 'retry_after' => 90, 67 | 'block_for' => null, 68 | ], 69 | 70 | ], 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Failed Queue Jobs 75 | |-------------------------------------------------------------------------- 76 | | 77 | | These options configure the behavior of failed queue job logging so you 78 | | can control which database and table are used to store the jobs that 79 | | have failed. You may change them to any database / table you wish. 80 | | 81 | */ 82 | 83 | 'failed' => [ 84 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 85 | 'database' => env('DB_CONNECTION', 'mysql'), 86 | 'table' => 'failed_jobs', 87 | ], 88 | 89 | ]; 90 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/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 if it can not 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 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /laravel/database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name, 27 | 'email' => $this->faker->unique()->safeEmail, 28 | 'email_verified_at' => now(), 29 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 30 | 'remember_token' => Str::random(10), 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/database/migrations/2019_05_16_184117_create_examples_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | 19 | $table->string('name'); 20 | $table->string('value'); 21 | 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('examples'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(ExamplesTableSeeder::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /laravel/database/seeders/ExamplesTableSeeder.php: -------------------------------------------------------------------------------- 1 | name = 'test'; 19 | $item->value = 300; 20 | $item->save(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /laravel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "npm run development -- --watch", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.19", 14 | "cross-env": "^7.0", 15 | "laravel-mix": "^5.0.1", 16 | "lodash": "^4.17.19", 17 | "resolve-url-loader": "^3.1.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvilFreelancer/laravel-swagger-example/fda4bd108053495c19fa7ff1ddd1d02a93c04f47/laravel/public/favicon.ico -------------------------------------------------------------------------------- /laravel/public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = tap($kernel->handle( 52 | $request = Request::capture() 53 | ))->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /laravel/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/resources/css/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvilFreelancer/laravel-swagger-example/fda4bd108053495c19fa7ff1ddd1d02a93c04f47/laravel/resources/css/app.css -------------------------------------------------------------------------------- /laravel/resources/js/app.js: -------------------------------------------------------------------------------- 1 | require('./bootstrap'); 2 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /laravel/resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'active_url' => 'The :attribute is not a valid URL.', 18 | 'after' => 'The :attribute must be a date after :date.', 19 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 20 | 'alpha' => 'The :attribute may only contain letters.', 21 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', 22 | 'alpha_num' => 'The :attribute may only contain letters and numbers.', 23 | 'array' => 'The :attribute must be an array.', 24 | 'before' => 'The :attribute must be a date before :date.', 25 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 26 | 'between' => [ 27 | 'numeric' => 'The :attribute must be between :min and :max.', 28 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 29 | 'string' => 'The :attribute must be between :min and :max characters.', 30 | 'array' => 'The :attribute must have between :min and :max items.', 31 | ], 32 | 'boolean' => 'The :attribute field must be true or false.', 33 | 'confirmed' => 'The :attribute confirmation does not match.', 34 | 'date' => 'The :attribute is not a valid date.', 35 | 'date_equals' => 'The :attribute must be a date equal to :date.', 36 | 'date_format' => 'The :attribute does not match the format :format.', 37 | 'different' => 'The :attribute and :other must be different.', 38 | 'digits' => 'The :attribute must be :digits digits.', 39 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 40 | 'dimensions' => 'The :attribute has invalid image dimensions.', 41 | 'distinct' => 'The :attribute field has a duplicate value.', 42 | 'email' => 'The :attribute must be a valid email address.', 43 | 'ends_with' => 'The :attribute must end with one of the following: :values.', 44 | 'exists' => 'The selected :attribute is invalid.', 45 | 'file' => 'The :attribute must be a file.', 46 | 'filled' => 'The :attribute field must have a value.', 47 | 'gt' => [ 48 | 'numeric' => 'The :attribute must be greater than :value.', 49 | 'file' => 'The :attribute must be greater than :value kilobytes.', 50 | 'string' => 'The :attribute must be greater than :value characters.', 51 | 'array' => 'The :attribute must have more than :value items.', 52 | ], 53 | 'gte' => [ 54 | 'numeric' => 'The :attribute must be greater than or equal :value.', 55 | 'file' => 'The :attribute must be greater than or equal :value kilobytes.', 56 | 'string' => 'The :attribute must be greater than or equal :value characters.', 57 | 'array' => 'The :attribute must have :value items or more.', 58 | ], 59 | 'image' => 'The :attribute must be an image.', 60 | 'in' => 'The selected :attribute is invalid.', 61 | 'in_array' => 'The :attribute field does not exist in :other.', 62 | 'integer' => 'The :attribute must be an integer.', 63 | 'ip' => 'The :attribute must be a valid IP address.', 64 | 'ipv4' => 'The :attribute must be a valid IPv4 address.', 65 | 'ipv6' => 'The :attribute must be a valid IPv6 address.', 66 | 'json' => 'The :attribute must be a valid JSON string.', 67 | 'lt' => [ 68 | 'numeric' => 'The :attribute must be less than :value.', 69 | 'file' => 'The :attribute must be less than :value kilobytes.', 70 | 'string' => 'The :attribute must be less than :value characters.', 71 | 'array' => 'The :attribute must have less than :value items.', 72 | ], 73 | 'lte' => [ 74 | 'numeric' => 'The :attribute must be less than or equal :value.', 75 | 'file' => 'The :attribute must be less than or equal :value kilobytes.', 76 | 'string' => 'The :attribute must be less than or equal :value characters.', 77 | 'array' => 'The :attribute must not have more than :value items.', 78 | ], 79 | 'max' => [ 80 | 'numeric' => 'The :attribute may not be greater than :max.', 81 | 'file' => 'The :attribute may not be greater than :max kilobytes.', 82 | 'string' => 'The :attribute may not be greater than :max characters.', 83 | 'array' => 'The :attribute may not have more than :max items.', 84 | ], 85 | 'mimes' => 'The :attribute must be a file of type: :values.', 86 | 'mimetypes' => 'The :attribute must be a file of type: :values.', 87 | 'min' => [ 88 | 'numeric' => 'The :attribute must be at least :min.', 89 | 'file' => 'The :attribute must be at least :min kilobytes.', 90 | 'string' => 'The :attribute must be at least :min characters.', 91 | 'array' => 'The :attribute must have at least :min items.', 92 | ], 93 | 'multiple_of' => 'The :attribute must be a multiple of :value', 94 | 'not_in' => 'The selected :attribute is invalid.', 95 | 'not_regex' => 'The :attribute format is invalid.', 96 | 'numeric' => 'The :attribute must be a number.', 97 | 'password' => 'The password is incorrect.', 98 | 'present' => 'The :attribute field must be present.', 99 | 'regex' => 'The :attribute format is invalid.', 100 | 'required' => 'The :attribute field is required.', 101 | 'required_if' => 'The :attribute field is required when :other is :value.', 102 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 103 | 'required_with' => 'The :attribute field is required when :values is present.', 104 | 'required_with_all' => 'The :attribute field is required when :values are present.', 105 | 'required_without' => 'The :attribute field is required when :values is not present.', 106 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 107 | 'same' => 'The :attribute and :other must match.', 108 | 'size' => [ 109 | 'numeric' => 'The :attribute must be :size.', 110 | 'file' => 'The :attribute must be :size kilobytes.', 111 | 'string' => 'The :attribute must be :size characters.', 112 | 'array' => 'The :attribute must contain :size items.', 113 | ], 114 | 'starts_with' => 'The :attribute must start with one of the following: :values.', 115 | 'string' => 'The :attribute must be a string.', 116 | 'timezone' => 'The :attribute must be a valid zone.', 117 | 'unique' => 'The :attribute has already been taken.', 118 | 'uploaded' => 'The :attribute failed to upload.', 119 | 'url' => 'The :attribute format is invalid.', 120 | 'uuid' => 'The :attribute must be a valid UUID.', 121 | 122 | /* 123 | |-------------------------------------------------------------------------- 124 | | Custom Validation Language Lines 125 | |-------------------------------------------------------------------------- 126 | | 127 | | Here you may specify custom validation messages for attributes using the 128 | | convention "attribute.rule" to name the lines. This makes it quick to 129 | | specify a specific custom language line for a given attribute rule. 130 | | 131 | */ 132 | 133 | 'custom' => [ 134 | 'attribute-name' => [ 135 | 'rule-name' => 'custom-message', 136 | ], 137 | ], 138 | 139 | /* 140 | |-------------------------------------------------------------------------- 141 | | Custom Validation Attributes 142 | |-------------------------------------------------------------------------- 143 | | 144 | | The following language lines are used to swap our attribute placeholder 145 | | with something more reader friendly such as "E-Mail Address" instead 146 | | of "email". This simply helps us make our message more expressive. 147 | | 148 | */ 149 | 150 | 'attributes' => [], 151 | 152 | ]; 153 | -------------------------------------------------------------------------------- /laravel/resources/views/vendor/l5-swagger/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvilFreelancer/laravel-swagger-example/fda4bd108053495c19fa7ff1ddd1d02a93c04f47/laravel/resources/views/vendor/l5-swagger/.gitkeep -------------------------------------------------------------------------------- /laravel/resources/views/vendor/l5-swagger/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{config('l5-swagger.documentations.'.$documentation.'.api.title')}} 7 | 8 | 9 | 10 | 11 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
69 | 70 | 71 | 72 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /laravel/resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Laravel 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 22 | 23 | 24 |
25 | @if (Route::has('login')) 26 | 37 | @endif 38 | 39 |
40 |
41 | 42 | 43 | 44 | 45 | 46 |
47 | 48 |
49 |
50 |
51 |
52 | 53 | 54 |
55 | 56 |
57 |
58 | Laravel has wonderful, thorough documentation covering every aspect of the framework. Whether you are new to the framework or have previous experience with Laravel, we recommend reading all of the documentation from beginning to end. 59 |
60 |
61 |
62 | 63 |
64 |
65 | 66 | 67 |
68 | 69 |
70 |
71 | Laracasts offers thousands of video tutorials on Laravel, PHP, and JavaScript development. Check them out, see for yourself, and massively level up your development skills in the process. 72 |
73 |
74 |
75 | 76 |
77 |
78 | 79 | 80 |
81 | 82 |
83 |
84 | Laravel News is a community driven portal and newsletter aggregating all of the latest and most important news in the Laravel ecosystem, including new package releases and tutorials. 85 |
86 |
87 |
88 | 89 |
90 |
91 | 92 |
Vibrant Ecosystem
93 |
94 | 95 |
96 |
97 | Laravel's robust library of first-party tools and libraries, such as Forge, Vapor, Nova, and Envoyer help you take your projects to the next level. Pair them with powerful open source libraries like Cashier, Dusk, Echo, Horizon, Sanctum, Telescope, and more. 98 |
99 |
100 |
101 |
102 |
103 | 104 |
105 |
106 |
107 | 108 | 109 | 110 | 111 | 112 | Shop 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | Sponsor 121 | 122 |
123 |
124 | 125 |
126 | Build v{{ Illuminate\Foundation\Application::VERSION }} 127 |
128 |
129 |
130 |
131 | 132 | 133 | -------------------------------------------------------------------------------- /laravel/routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 19 | // return $request->user(); 20 | //}); 21 | 22 | Route::apiResource('examples', ExamplesController::class); 23 | -------------------------------------------------------------------------------- /laravel/routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /laravel/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/storage/api-docs/api-docs.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.0", 3 | "info": { 4 | "title": "Laravel Swagger API documentation example", 5 | "contact": { 6 | "email": "admin@example.com" 7 | }, 8 | "license": { 9 | "name": "Apache 2.0", 10 | "url": "http://www.apache.org/licenses/LICENSE-2.0.html" 11 | }, 12 | "version": "1.0.0" 13 | }, 14 | "servers": [ 15 | { 16 | "url": "http://localhost/api", 17 | "description": "Laravel Swagger API server" 18 | } 19 | ], 20 | "paths": { 21 | "/examples": { 22 | "get": { 23 | "tags": [ 24 | "Examples" 25 | ], 26 | "summary": "Display a listing of the resource", 27 | "operationId": "examplesAll", 28 | "parameters": [ 29 | { 30 | "name": "page", 31 | "in": "query", 32 | "description": "The page number", 33 | "required": false, 34 | "schema": { 35 | "type": "integer" 36 | } 37 | } 38 | ], 39 | "responses": { 40 | "200": { 41 | "description": "Everything is fine", 42 | "content": { 43 | "application/json": { 44 | "schema": { 45 | "type": "array", 46 | "items": { 47 | "$ref": "#/components/schemas/ExampleShowRequest" 48 | } 49 | } 50 | } 51 | } 52 | } 53 | }, 54 | "security": [ 55 | { 56 | "api_key": [] 57 | } 58 | ] 59 | }, 60 | "post": { 61 | "tags": [ 62 | "Examples" 63 | ], 64 | "summary": "Create yet another example record", 65 | "operationId": "exampleCreate", 66 | "requestBody": { 67 | "required": true, 68 | "content": { 69 | "application/json": { 70 | "schema": { 71 | "$ref": "#/components/schemas/ExampleStoreRequest" 72 | } 73 | } 74 | } 75 | }, 76 | "responses": { 77 | "200": { 78 | "description": "Everything is fine", 79 | "content": { 80 | "application/json": { 81 | "schema": { 82 | "$ref": "#/components/schemas/ExampleShowRequest" 83 | } 84 | } 85 | } 86 | } 87 | }, 88 | "security": [ 89 | { 90 | "api_key": [] 91 | } 92 | ] 93 | } 94 | }, 95 | "/examples/{id}": { 96 | "get": { 97 | "tags": [ 98 | "Examples" 99 | ], 100 | "summary": "Get example by ID", 101 | "operationId": "examplesGet", 102 | "parameters": [ 103 | { 104 | "name": "id", 105 | "in": "path", 106 | "description": "The ID of example", 107 | "required": true, 108 | "schema": { 109 | "type": "integer" 110 | }, 111 | "example": "1" 112 | } 113 | ], 114 | "responses": { 115 | "200": { 116 | "description": "Everything is fine", 117 | "content": { 118 | "application/json": { 119 | "schema": { 120 | "$ref": "#/components/schemas/ExampleShowRequest" 121 | } 122 | } 123 | } 124 | } 125 | }, 126 | "security": [ 127 | { 128 | "api_key": [] 129 | } 130 | ] 131 | }, 132 | "put": { 133 | "tags": [ 134 | "Examples" 135 | ], 136 | "summary": "Update example by ID", 137 | "operationId": "examplesUpdate", 138 | "parameters": [ 139 | { 140 | "name": "id", 141 | "in": "path", 142 | "description": "The ID of example", 143 | "required": true, 144 | "schema": { 145 | "type": "integer" 146 | }, 147 | "example": "1" 148 | } 149 | ], 150 | "requestBody": { 151 | "required": true, 152 | "content": { 153 | "application/json": { 154 | "schema": { 155 | "$ref": "#/components/schemas/ExampleStoreRequest" 156 | } 157 | } 158 | } 159 | }, 160 | "responses": { 161 | "200": { 162 | "description": "Everything is fine", 163 | "content": { 164 | "application/json": { 165 | "schema": { 166 | "$ref": "#/components/schemas/ExampleShowRequest" 167 | } 168 | } 169 | } 170 | } 171 | }, 172 | "security": [ 173 | { 174 | "api_key": [] 175 | } 176 | ] 177 | }, 178 | "delete": { 179 | "tags": [ 180 | "Examples" 181 | ], 182 | "summary": "Delete example by ID", 183 | "operationId": "examplesDelete", 184 | "parameters": [ 185 | { 186 | "name": "id", 187 | "in": "path", 188 | "description": "The ID of example", 189 | "required": true, 190 | "schema": { 191 | "type": "integer" 192 | }, 193 | "example": "1" 194 | } 195 | ], 196 | "responses": { 197 | "202": { 198 | "description": "Deleted" 199 | } 200 | }, 201 | "security": [ 202 | { 203 | "api_key": [] 204 | } 205 | ] 206 | } 207 | } 208 | }, 209 | "components": { 210 | "schemas": { 211 | "ExampleShowRequest": { 212 | "title": "Example showing request", 213 | "description": "Some simple request createa as example", 214 | "properties": { 215 | "id": { 216 | "title": "ID", 217 | "description": "Unique ID", 218 | "type": "integer", 219 | "example": "1" 220 | }, 221 | "name": { 222 | "title": "Name", 223 | "description": "Name of key for storring", 224 | "type": "string", 225 | "example": "random" 226 | }, 227 | "value": { 228 | "title": "Value", 229 | "description": "Value for storring", 230 | "type": "string", 231 | "example": "awesome" 232 | } 233 | }, 234 | "type": "object" 235 | }, 236 | "ExampleStoreRequest": { 237 | "title": "Example storring request", 238 | "description": "Some simple request createa as example", 239 | "properties": { 240 | "name": { 241 | "title": "Name", 242 | "description": "Name of key for storring", 243 | "type": "string", 244 | "example": "random" 245 | }, 246 | "value": { 247 | "title": "Value", 248 | "description": "Value for storring", 249 | "type": "string", 250 | "example": "awesome" 251 | } 252 | }, 253 | "type": "object" 254 | }, 255 | "ProfileModel": { 256 | "title": "Example user's profile", 257 | "description": "Some simple request createa as example", 258 | "properties": { 259 | "birthday": { 260 | "title": "Birthday", 261 | "description": "The day", 262 | "type": "string", 263 | "format": "date", 264 | "example": "1985-05-11" 265 | }, 266 | "inn": { 267 | "title": "INN of user", 268 | "description": "INN", 269 | "type": "string", 270 | "format": "number", 271 | "example": "1234567890" 272 | }, 273 | "document_type": { 274 | "title": "Document type", 275 | "description": "Type of provided document", 276 | "type": "string", 277 | "format": "string", 278 | "example": "Паспорт РФ" 279 | }, 280 | "document_serial": { 281 | "title": "Document serial", 282 | "description": "Serial number of provided document", 283 | "type": "integer", 284 | "format": "number", 285 | "example": "1111" 286 | }, 287 | "document_number": { 288 | "title": "Document number", 289 | "description": "Number of provided document", 290 | "type": "integer", 291 | "format": "number", 292 | "example": "222222" 293 | }, 294 | "document_date": { 295 | "title": "Document date", 296 | "description": "Date of registration of provided document", 297 | "type": "integer", 298 | "format": "date", 299 | "example": "2015-11-12" 300 | }, 301 | "document_department_code": { 302 | "title": "Document department code", 303 | "description": "Department code of provided document", 304 | "type": "string", 305 | "format": "string", 306 | "pattern": "^\\d{2,5}-\\d{2,5}", 307 | "example": "111-222" 308 | }, 309 | "document_department_name": { 310 | "title": "Document department name", 311 | "description": "Department name of provided document", 312 | "type": "string", 313 | "format": "string", 314 | "example": "УВД г. Москвы" 315 | }, 316 | "registry_address": { 317 | "title": "Registry address", 318 | "description": "Registry address of provided document", 319 | "type": "string", 320 | "format": "string", 321 | "example": "г. Москва, ул. Рябиновая, д. 15, кв. 11" 322 | } 323 | }, 324 | "type": "object" 325 | }, 326 | "StoreRequest": { 327 | "title": "Example complex model", 328 | "description": "Example complex object", 329 | "properties": { 330 | "user": { 331 | "$ref": "#/components/schemas/UserModel" 332 | }, 333 | "profile": { 334 | "$ref": "#/components/schemas/ProfileModel" 335 | } 336 | }, 337 | "type": "object" 338 | }, 339 | "UserModel": { 340 | "title": "Example user's model", 341 | "description": "Some simple request createa as example", 342 | "properties": { 343 | "first_name": { 344 | "title": "First Name", 345 | "description": "The first name", 346 | "type": "string", 347 | "format": "string", 348 | "example": "Сергей" 349 | }, 350 | "last_name": { 351 | "title": "Last Name", 352 | "description": "The last name", 353 | "type": "string", 354 | "format": "string", 355 | "example": "Сергеев" 356 | }, 357 | "email": { 358 | "title": "Email", 359 | "description": "Email of user", 360 | "type": "string", 361 | "format": "email", 362 | "example": "sergeev2@example.com" 363 | }, 364 | "phone": { 365 | "title": "Phone", 366 | "description": "Phone of user", 367 | "type": "string", 368 | "format": "string", 369 | "example": "+7 (909) 123-45-88" 370 | } 371 | }, 372 | "type": "object" 373 | } 374 | }, 375 | "securitySchemes": { 376 | "X-APP-ID": { 377 | "type": "apiKey", 378 | "name": "X-APP-ID", 379 | "in": "header" 380 | } 381 | } 382 | }, 383 | "tags": [ 384 | { 385 | "name": "Examples", 386 | "description": "Some example pages" 387 | } 388 | ], 389 | "security": [ 390 | [] 391 | ] 392 | } -------------------------------------------------------------------------------- /laravel/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /laravel/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /laravel/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 | -------------------------------------------------------------------------------- /laravel/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /laravel/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /laravel/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /laravel/storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /laravel/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /laravel/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /laravel/tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /laravel/tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /laravel/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /laravel/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 | --------------------------------------------------------------------------------