Your Laravel week in review ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Your Laravel week in review

Week 468

Raw Query Output With Bindings is Coming to Laravel 10

Thanks to Tobias Petry, Laravel 10 is getting a long-awaited feature to get the raw SQL query, including bindings. This feature will be part of the next tagged v10.x release, which usually happens weekly and here is an example:

User::where('email', 'foo@example.com')->toRawSql();

Which will then dump the following results:

"SELECT * FROM users WHERE email = 'foo@example.com'"

One of the major advantages to this is you'll be able to dumb the query out and immediatly copy / paste it to run the query manually against or database. Or for those that prefer to get a little fancy, take the query and run it through ChatGPT asking for advice:

ME: With this query "SELECT * FROM users WHERE email = 'foo@example.com'" tell me where I need to add an index

ChatGTP: To optimize the given SQL query, you should add an index on the "email" column in the "users" table, because it is used in the WHERE clause of your SELECT statement.

Speaking of ChatGPT and OpenAI. Did you know they are hiring and one of the requirements is familiarity with Laravel? To quote Aaron Francis, "probably nothing".

Sponsor

Livestream AMA: PHP Error Monitoring with Sentry

Whether it’s a bug in a third-party API or an issue with authentication middleware, Sentry not only tells you when backend errors happen, but the who, what, and where behind them. Join Sentry on July 11th at 10am PDT for a 20 minute tutorial on how to get start monitoring your backend project in minutes.

In 20 minutes we’ll cover how Sentry features like stack traces with source code, stack locals, tagging, breadcrumbs and tracing can reduce the time you spend debugging down from days to minutes.

Laravel 10.14 Released

This week, the Laravel team released v10.14 with a new can() validation rule, custom Gate denial responses, global HTTP client middleware, and more.

Pines: An Alpine and Tailwind UI Library

Pines UI is an Alpine and Tailwind UI Library by Tony Lea. Pines is a library of animations, sliders, tooltips, accordions, modals, and more!

Generate Code in Laravel with Synth

The Synth package for Laravel that helps you generate code and perform various tasks in your Laravel application.

Laravel Jobs

The official Laravel job board connecting the best jobs with top talent.

Now hiring

Post a job on LaraJobs and it'll be featured here next week.

The Archives

Laravel News PO Box 196 Cramerton NC, 28032
Send us a postcard! You are receiving this because you joined the Laravel News weekly digest. If you know someone who would enjoy this newsletter please consider sharing it.

View Online | Preferences | Unsubscribe

Facebook Instagram LinkedIn Twitter YouTube