Laravel Cron Job Task Scheduling Tutorial
To set up cron job task scheduling in Laravel, create a custom artisan command, schedule to run the task in kernel.php, and add task scheduler into crontab.
How to solve error: array_merge() does not accept unknown named parameters
The solve the error “array_merge() does not accept unknown named parameters” upgrade composer to the latest version or downgrade the PHP version to 7.X.
Only one default export allowed per module
React error “Only one default export allowed per module” happens when multiple default exports are in a javascript file. Learn how to solve this error.
How to Fix - React Hook useEffect has a missing dependency
To fix the warning - React Hook useEffect has a missing dependency, use memoization hook useMemo, and add missing dependency in the dependency array.
Expected `onClick` listener to be a function, instead got a value of `string` type
To solve “Expected `onClick` listener to be a function, instead got a value of `string` type.”, make sure to pass a function to the onClick prop of an element.
How to Solve TypeError: Cannot destructure property 'basename' of 'React2.useContext'
Learn to solve TypeError:Cannot destructure property 'basename' of 'React2.useContext(...)', 'react__WEBPACK_IMPORTED_MODULE_0__ .useContext(...)'
How to display validation error messages in Laravel blade view
To display validation error messages, use the $error variable available in all Laravel blade views. Learn how to perform validation and display custom errors.
Laravel Model Events and Observers Tutorial
Learn Laravel eloquent model events, how to create an Observer class, add listeners for different events, and register observers in the EventServiceProvider.
Unexpected default export of anonymous function
To solve the warning “Unexpected default export of anonymous function import/no-anonymous-default-export” give a name for the function before export default.
node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
To solve the error “node: --openssl-legacy-provider is not allowed in NODE_OPTIONS”, unset the value in the environment variable NODE_OPTIONS.
Get the Mouse Position (coordinates) in React
To get the Mouse position (coordinates) in React, use mousemove event and access event properties clientX and clientY for coordinates of the cursor on window.
Reset to the initial state in React
To reset to the initial state in React, store the initial state in a variable and when reset is required, pass the initial state variable to setState() function.