Download the PHP package danielemontecchi/laravel-basics without Composer

On this page you can find all versions of the php package danielemontecchi/laravel-basics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-basics

Laravel Basics Package

Latest Version on Packagist Total Downloads GitHub Tests Action Status Coverage PHPStan Quality Gate Status Maintainability Rating Documentation

A zero-setup package to bootstrap your Laravel projects with a collection of sensible defaults, strict mode helpers, developer protections, and performance tooling. Inspired by nunomaduro/essentials.


Requirements


Installation

The package auto-registers via Laravel's service provider discovery.


Configuration

Publish the config file:

This will create config/laravel-basics.php, where each feature can be individually enabled or disabled.


Full Setup: Development Tools, Code Style and Git Hooks

Run the following command to interactively install and configure useful development tools:

This command will offer to install and configure the following:

You can safely rerun this command. It will never overwrite files without asking for confirmation.


Available Features

✅ AutomaticallyEagerLoadRelationships

Enables automatic eager loading of relationships listed in $touches (Laravel 10.37+). Prevents N+1 queries caused by deferred loading of touched relations.

✅ DefaultPasswordRules

Enforces stricter password validation globally in production: minimum 12 characters, maximum 50, and cross-checked against known data breach databases. No rules are enforced in non-production environments.

✅ DisableQueryLog

Disables the Eloquent query log in production. The log accumulates all executed queries in memory and is only useful during debugging — leaving it enabled causes silent memory growth in long-running processes.

✅ FakeSleep

Mocks Sleep::for(...) during tests so no real time is spent waiting. Keeps the test suite fast without changing application code.

✅ ForceHttpsScheme

Forces all generated URLs to use HTTPS via URL::forceScheme('https'). Useful when the app runs behind a proxy or CDN that terminates SSL.

✅ HttpClientGlobalTimeout

Sets a global timeout (default: 30 seconds) for all outgoing Http:: client requests. Prevents hanging requests from blocking production workers indefinitely. Set the value in seconds; use false to disable.

✅ ImmutableDates

Replaces mutable Carbon instances with CarbonImmutable across the entire application. Prevents accidental date mutations when passing date objects between methods.

✅ LogSlowQueries

Logs database queries exceeding a configurable threshold (default: 100ms) as warnings. Helps surface performance issues early in development and staging.

✅ PreventAccessingMissingAttributes

Throws an exception when accessing a model attribute that has not been loaded or does not exist. Catches typos and missing select() columns that would otherwise fail silently.

✅ PreventLazyLoading

Throws an exception for any lazy-loaded relationship in non-production environments. Forces eager loading and prevents N+1 query problems from reaching production undetected.

✅ PreventSilentlyDiscardingAttributes

Throws an exception if attributes unknown to the model are passed to fill() or create(). Prevents silent data loss caused by mismatched field names or typos in mass assignments.

✅ PreventStrayHttpRequests

Prevents real HTTP requests from being made during tests unless explicitly faked with Http::fake(). Protects against tests accidentally calling external services.

✅ ProhibitDestructiveCommands

Blocks Artisan commands like migrate:fresh, db:wipe, and migrate:reset in production. Reduces the risk of irreversible data loss from accidental command execution.

✅ SchemaDefaultStringLength

Sets the default string column length for migrations (default: 191). Required for utf8mb4 charset support on older MySQL and MariaDB versions.

✅ SetDefaultTimezone

Sets the PHP runtime timezone from the app.timezone config value. Complements SetLocale to ensure both locale and timezone are consistently applied from the application configuration.

✅ SetLocale

Sets the PHP and Carbon locale using the current app.locale config value. Ensures date formatting and string operations use the correct language settings.

✅ ShouldBeStrict

Enables Eloquent strict mode globally in non-production environments. Combines PreventLazyLoading, PreventSilentlyDiscardingAttributes, and PreventAccessingMissingAttributes into a single model-level setting.

✅ TrustProxies

Configures trusted proxies for applications running behind load balancers or CDNs. Required for ForceHttpsScheme and correct client IP detection to work reliably when the app sits behind a reverse proxy. Trusts 127.0.0.1 and ::1 by default.

✅ UnguardModels

Disables Laravel mass-assignment protection globally. Use only in safe, controlled environments such as internal tools, seeders, or closed systems.

✅ ViteAggressivePrefetching

Enables aggressive chunk prefetching in Vite to reduce navigation latency in SPAs.


License

Laravel Basics is open-source software licensed under the MIT license. See the LICENSE.md file for full details.


Made with ❤️ by Daniele Montecchi


All versions of laravel-basics with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1 || ^8.2 || ^8.3 || ^8.4
laravel/framework Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package danielemontecchi/laravel-basics contains the following files

Loading the files please wait ...