The stream or file “/opt/lampp/htdocs/testproject/storage/logs/laravel-2021-08-31.log” could not be opened in append mode: failed to open stream: Permission denied

Problem I’m getting this error after migrating my laravel project to linux server, see error below Solution the error is that, Storage folder doesn’t have permission to write log files, you can run if you are using nginx then you need to use nginx user permission like below That’s All. I hope this article helps you to solve the problem. Thanks for reading. Keep Exploring.

Read more

Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface Illuminate\Contracts\Auth\Authenticatable, null given, called in. Solved !

This usually occurs when using of Laravel Socialite for authentication Socialite In addition to typical, form based authentication, Laravel also provides a simple, convenient way to authenticate with OAuth providers using Laravel Socialite. Socialite currently supports authentication with Facebook, Twitter, LinkedIn, Google, GitHub, GitLab, and Bitbucket. Error Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface Illuminate\Contracts\Auth\Authenticatable, null given, called in C:\xampp\htdocs\WrokSpace\professional\vendor\laravel\framework\src\Illuminate\Auth\AuthManager.php on line 297 Solution Just delete the social provider assigned to that user id from your database table and that’s

Read more

How To Set Up Task Scheduling With Cron Job In Laravel for Linux Server.

Step 1:- Run the below command to Install Laravel 5.8 Step 2 :- Now, we need to create a custom command. Custom command will execute with task scheduling cron job. Run the below command to create new custom command Now we make some changes on Command file. app/Console/Commands/DemoCron.php Step 3 :- Now, we need to define our commands on Kernel.php file with time when you want to run your command like as bellow functions: ->everyMinute(); Run the task every minute

Read more

Laravel Permissions to set on Storage folder on Linux.

When we Setup laravel project on linux server then we have to give permissions to all folder’s, sub-folder’s and files in laravel Storage folder. So, i’m providing the list of permission which you have to set in storage folder. I’m providing this list because we can’t set 777 permission to all folders, if we do then it’s may be a security concern. So i’m providing a complete list of each folder’s and sub-folder’s permissions. storage – 755. storage/app – 755.storage/app/public

Read more

Deploy a Laravel project to ubuntu server using git

Steps to create project in local machine Step :1 Create a folder anywhere in your local computer with any name (Mine is workspace) Step:2 Make sure git and gitbash is installed in your local machine if not download it from here Step:3 Login into your GitHub account and create a repository Step 4: Clone the repository into your local machine get inside your repository Copy the URL under HTTPS area There are many more ways to clone a repo but

Read more

Laravel : Regex Validation For Password

Minimum eight characters, at least one letter and one number: Minimum eight characters, at least one letter, one number and one special character: Minimum eight characters, at least one uppercase letter, one lowercase letter and one number: Minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character: Minimum eight and maximum 10 characters, at least one uppercase letter, one lowercase letter, one number and one special character:

Read more

Permissions required to make a Laravel project up and running in ubuntu (Linux)

Before moving further, hope you have already installed xampp and composer in your machine.if not follow the below blog to do so. First permission: As you know the first thing our browser needs to run a Laravel project is, the index file which is located in the public folder so we need to make it read and writable so that our browser can access it and if required can modify it. Run the below command to grant access to the

Read more

Install a Laravel project inside htdocs folder in ubuntu

I was moving a Laravel project to a ubuntu virtual machine.Steps that I followed: 1. Installed Xampp 2. Another thing which is required is Composer 3. Now the thing is when we try to install Laravel project inside our htdocs folder it through an error 4. To resolve this error first create a folder inside your htdocs. 5 grant read and write permissions to this folder by running this commands 6. You may get another error while installing is (“mbstring”

Read more

require ext-dom * -> it is missing from your system. Install or enable PHP’s dom extension.

Make sure you are in htdocs folder while executing the commands. I was trying to install Laravel in a Ubuntu virtual machine and got this error Your requirements could not be resolved to an installable set of packages. Problem 1 – phpunit/phpunit[7.5.0, …, 7.5.20] require ext-dom * -> it is missing from your system. Install or enable PHP’s dom extension. – Root composer.json requires phpunit/phpunit ^7.5 -> satisfiable by phpunit/phpunit[7.5.0, …, 7.5.20]. And To enable extensions, verify that they are

Read more

Adding an Auto-Complete Address Field to your Forms (Laravel)

First of all we need to get a google maps API, go through this documentation to get an API of your own. Next thing we need to do is to put a initializing script in our blade file Make sure to provide your api key in the script The above script will call a method name initAutocomplete that we have to write in our .js file Make sure you form have these matching selectors What i have done in above

Read more

How to get current city name using google maps API (Laravel)

First of all we need to get a google maps API, go through this documentation to get an API of your own.https://developers.google.com/maps/documentation/javascript/get-api-key Place this script in your blade file if your are using Laravel or in your HTML inside body tags. Make sure to put your API key in the place of YOUR_API_KEY in provided script above Next thing you need to do after initializing the map is to create a method in jQuery for the call-back method initMap ,

Read more