Laravel

Deploy Laravel 11 project on Shared Hosting, the Easiest Way

Are you hosting a Laravel 11  project on your server but struggling to access it directly from your domain? Fear not, as configuring Apache redirect rules can seamlessly direct traffic to your Laravel project folder.  after archiving and uploading your Laravel project to your cPanel  Follow these steps to set up the redirect rules via […]

Deploy Laravel 11 project on Shared Hosting, the Easiest Way Read More »

Understanding CSRF Protection in Laravel

CSRF attacks occur when an attacker tricks a user’s browser into making an unintended request. To counteract this threat, Laravel includes CSRF protection by default. The framework generates unique CSRF tokens for each user session, and these tokens are validated on the server side for specific types of requests.     Login Response (Laravel to

Understanding CSRF Protection in Laravel Read More »

Laravel’s whereBetween not including date from

It is working as expected. The problem you are encountering is primarily that you are asking for the time between the exact same timestamp. While you are only specifying a specific day and not a time, a time is being included. In this case it is most likely exactly midnight. So ’20-05-2017′ becomes ’20-05-2017 00:00:00′. In this case

Laravel’s whereBetween not including date from Read More »

Generate temporary signed URL from s3 in Laravel

To create temporary files, you can use temporaryUrl method from the IlluminateSupportFacadeStorage facade. You can use the method on the following syntax. use IlluminateSupportFacadesStorage;$temporarySignedUrl = Storage::disk(‘s3’)->temporaryUrl(“filepath.pdf”, now()->addMinutes(10));   temporaryUrl method accepts two parameters as follows, Path: This parameter accepts the full path of the file in the s3 bucket Expiry Time: You can set the date for the expiry

Generate temporary signed URL from s3 in Laravel Read More »

Laravel `.env`, system-level, and server-level environment variables

I was curious about this as well. Here’s your answer: System Level Env Variables: These are set on the actual operating system themselves. For example, in Windows, system level variables can be configured in: Control Panel System Properties Click Environment Variables You will see all the system level variables Windows contains Not sure where env variables

Laravel `.env`, system-level, and server-level environment variables Read More »

Monitor logs in Laravel Telescope in production environment

The Laravel Telescope package is great for debugging your application when you’re working on your application in the local environment. It provides insight into the requests coming into your application, exceptions, log entries, database queries, queued jobs, mail, notifications, cache operations, scheduled tasks, variable dumps, and various other things in this beautiful interface. Now all this is great

Monitor logs in Laravel Telescope in production environment Read More »

Laravel Cache and Configuration Clearing Commands

Here are the cache-related commands and configuration clearing commands available in Laravel:   Cache Commands: 1. Clear Application Cache:    php artisan cache:clear     This command clears the application cache, including the default cache driver.   2. Clear Config Cache:    php artisan config:clear     This command clears the configuration cache, allowing Laravel to re-read

Laravel Cache and Configuration Clearing Commands Read More »

Laravel variable naming conventions

In Laravel, variable naming conventions typically follow the PHP naming conventions. Here are some common practices for variable naming in Laravel:   1. Camel Case: Variables should be named using camel case, where the first letter of each word is lowercase and subsequent words start with uppercase letters. For example:    $firstName   $totalAmount   $isAdminUser  

Laravel variable naming conventions Read More »