Laravel
PHP Dotenv
Our great sponsors
Laravel | PHP Dotenv | |
---|---|---|
225 | 25 | |
31,453 | 12,934 | |
1.3% | - | |
9.9 | 5.2 | |
3 days ago | 5 months ago | |
PHP | PHP | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Laravel
-
Tell HN: Laravel's default truncate method uses cascade for Postgres databases
Hope this saves a future team from unexpected behavior resulting in (potential) production data loss.
When using Postgres, Laravel's default method for truncate uses the cascade option, which will ignore foreign key constraints and potentially wipe large amounts of data with no confirmation or warning.
It was originally introduced in 2018: https://github.com/laravel/framework/pull/26389/files
Here are two threads on it if you are curious: https://github.com/laravel/framework/issues/29506
-
Exploring Middleware in Laravel 11
I am just exploring middleware in this post, but as you can see this is quite a different approach than we've seen historically. I sat there scratching my head, "How do I set up my own middleware? How do I change the defaults?" I had to explore the Illuminate\Foundation\Configuration\Middleware class to find out.
- Automatizando fluxos de trabalho com GitHub Actions
- Testando filas em projetos Laravel
-
alof-lib: a PHP array-like objects functions library
For example check out this issue I reported on their side: https://github.com/laravel/framework/issues/49089
-
PHP: check dates
It does not mean you should absolutely use it everywhere, but it can make sense for your case. Many frameworks, like Laravel use it to compose new projects.
-
An Internet of PHP
https://github.com/laravel/framework/blob/00894b89e42a9d707c...
Even Tinker is a few lines of code to extend PsySH and credit is barely given.
Taylor Otwell is a fiend for creating wrappers around solid open source libraries, using PHP magic and encouraging bad practices, all just to breed an ecosystem ultimately to land him a Lambo, fuelled by amazing open source foundations that have barely been contributed back to by him.
- Laravel 10.15 Released: Sub-minute Task Scheduling, Raw SQL Query Builder Methods, and More
-
Laravel’s ForwardsCalls trait
This same system has been used in Laravel since version 4.0* albeit in the more PHP plain way, using call_user_func_array (Laravel Model Class).
- From Concept to Image: Exploring OpenAI Image Generation API with Laravel 10 and VueJS
PHP Dotenv
-
PHP Authentication: Implementing Access Token
After successfully setting up our project, you'll observe that certain packages come pre-installed. One of these packages is vlucas/phpdotenv. This package serves the purpose of facilitating the loading of .env variables within your projects. These variables, stored in a file named '.env', allow for the configuration of various settings without hardcoding them directly into your code. Instead, you can define environment-specific variables such as database credentials, API keys, or any other sensitive information in the .env file, providing a more flexible and secure approach to configuration management.
-
Question Regarding Environment Variables
Recently, I jumped to reading on the documentation of the function putenv() and define() and the array $_ENV to understand the different between all. Also, I looked at the library phpdotenv and how it handles environment variables since its the standard approach to go with when dealing with environment variables in PHP.
- Hiding API keys in PHP ?!
-
Is it possible to store sensitive data on a shared hosting's DB?
So to get down to it, what are some of the best practices here? First off, things that you would normally do, like utilize some sort of secrets manager, that won't be available to you. You also can't utilize environment variables with apache. So you're going to have to have some sort of local secret (password/passphrase) to perform the encryption/decryption. With that said, mysql does provide AES encryption with their AES_ENCRYPT/AES_DECRYPT calls, so in that manner, yes you can safely store PII or other values in a shared MySQL. You can use a php library like https://github.com/vlucas/phpdotenv The decryption password(s) should be in the .ENV file Nothing prevents you from utilizing some scheme perhaps to provide multiple passwords if you want to, perhaps a separate one for each individual column you plan to encrypt.
-
Sending E-mails in PHP with PHPMailer
DotEnv - a popular library that allows us to use environment variables in our project.
-
Creating an application #1 - introduction
[PHP dotenv.](https://github.com/vlucas/phpdotenv) Loads environment variables from `.env` to `getenv(), $_ENV` and `$_SERVER`
-
Creating an application in Yii3.
PHP dotenv. Loads environment variables from .env to getenv(), $_ENV and $_SERVER automagically.
-
Help creating a JSON file to store database passwords outside of root folder
Use this library https://github.com/vlucas/phpdotenv. Hopefully you are using composer. If not, please consider using it.
-
How to Send an Email in Any Language Using the Nylas APIs
First, we need to have PHP installed as well as Composer (A dependency manager for PHP). Using Composer, we need to install dotenv which will allow us to read .env files.
-
The PHPer's Guide to OAuth
Here, I'm using the vlucas/phpdotenv library to process .env files.
What are some alternatives?
nuxt3-supabase - Nuxt 3 module and composables for Supabase.
Symfony Dotenv - Registers environment variables from a .env file
octane - Supercharge your Laravel application's performance.
Expose - A beautiful, fully open-source, tunneling service - written in pure PHP
fingerprintjs - Browser fingerprinting library. Accuracy of this version is 40-60%, accuracy of the commercial Fingerprint Identification is 99.5%. V4 of this library is BSL licensed.
Safe - All PHP functions, rewritten to throw exceptions instead of returning false
FrameworkBenchmarks - Source for the TechEmpower Framework Benchmarks project
notion-sdk-php - PHP library for the official Notion API.
Nextcloud - ☁️ Nextcloud server, a safe home for all your data
Square - PHP client library for the Square Connect APIs
ProxiTok - Open source alternative frontend for TikTok made using PHP
Symfony VarDumper - Provides mechanisms for walking through any arbitrary PHP variable