If you want to add some additional server checks for Spatie's Laravel Server Monitor Package, check out this extra server monitor checks package.
The post Extra Checks for Laravel Server Monitor appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
---
03 June, 2023
02 June, 2023
How to build a Dynamic SELECT Query in Mule 4 to get data from Snowflake
Programing Coderfunda
June 02, 2023
No comments
I have a requirement to build a dynamic SELECT query which has to take any select number of attributes, any table name and any number of where conditions like a sample query hown below. The values in {} will be dynamic.
select {first_name,last_name} from {tableName} where {student_id=12345 and status='active'}
if first_name,last_name are not present, then it will be all (select * from). Where condition also may be empty.
I am thinking maybe I can handle the inputs to my API as below
{first_name,last_name} - payload {tableName} - uri param {student_id=12345&status=active}- query params
rest endpoint will look like this – (POST) with input payload as shown below
http://**************/{tableName}?student_id=12345&status=active
input payload
{ param1:first_name, param2 : last_name }
Also planning to add table names in property file and map them to variable tableName based on the incoming path or a parameter to avoid security breaches.
Could you please suggest if this is the right approach? Want to avoid any security breaches and also want to make it more generic API for reusability.
01 June, 2023
Laravel 10.13 Released
Programing Coderfunda
June 01, 2023
No comments
This week, the Laravel team released v10.13 with database escaping functionality in Grammar, Sleep test hooks, response preparation events, and more.
The post Laravel 10.13 Released appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
---
31 May, 2023
Uploadcare Filesystem Adapter for Laravel
Programing Coderfunda
May 31, 2023
No comments
The Flysystem adapter for Uploadcare makes it easy to use the Uploadcare API to upload and manage files in Laravel and PHP applications.
The post Uploadcare Filesystem Adapter for Laravel appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
---
30 May, 2023
I need a practical example for SWR with the fallback option
Programing Coderfunda
May 30, 2023
No comments
I'm trying to understand better how SWR works paired up with NextJS. I have over studied the example shown in the SWR - Next.JS SSG and SSR tab, but I am still confused as how to get the data from an external API:
Why does the example from the hyperlink above uses '/api/article' as a key?
Is the useSWR hook going to grab this key and navigate to this destination?
Can I use an external API response such as "https://jsonplaceholder.typicode.com/posts"?
What do I put as a value inside the fallback object?
This is a simple snippet that I used to tinker with the fallback option. I do get a 1/4th of a second view of the data being displayed in the browser and it goes away turning into "John Doe".
import useSWR from "swr"
const fetcher = (...args) => fetch(...args).then(x=>x.json())
export default () =>{
const {data, error} = useSWR("/api/hello", fetcher, {fallback:{"/api/hello":{name:"foo bar" }}})
console.log(data)
return {data && data.name}
}
I would like to see some other use cases where this feature would come in handy. If there's a link that I could get in order to understand this feature better, then that would be very beneficial to me.
I also tried to explain in my words to see if there is a mistake in my knowledge and I could be corrected if my logic is wrong.
29 May, 2023
Weekly /r/Laravel Help Thread
Programing Coderfunda
May 29, 2023
No comments
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
* What steps have you taken so far?
* What have you tried from the documentation?
* Did you provide any error messages you are getting?
* Are you able to provide instructions to replicate the issue?
* Did you provide a code example?
* Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the /r/Laravel community! submitted by /u/AutoModerator
[link] [comments]
28 May, 2023
Can element be a parent of a control?
Programing Coderfunda
May 28, 2023
No comments
In a scenario, a parent of a control is responsible for performing & parsing data requests. However, it has no real DOM; the parsed data is for it's children only.
For the parent, one could use core.Control and do a simple render wrap around the children, but my question is, can core.Element be used for the parent & skip the unneeded render step for it, while still rendering its children?
Thanks


