Loading...

Follow Laravel Daily on Feedspot

Continue with Google
Continue with Facebook
or

Valid

Quite often, especially in e-shop projects, you can see a page to login or register before finishing the purchase. But Laravel has these two routes as separate login and register pages. So how to merge them together and avoid conflicts?

The post Laravel: Login and Register forms on the same page appeared first on Laravel Daily.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Imagine a Laravel project with 100+ routes, separate section for guest, users, administrators etc. Do you really want to keep it all in one file? How can you group them, add prefixes to URLs? Let's see what options we have.

The post How to Structure Routes in Large Laravel Projects? appeared first on Laravel Daily.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Laravel Validation system has 60+ validation rules available, but what if you want something extra? You can easily create your own validation rule, or use something already available on the internet. Let's take a look.

The post 40 Additional Laravel Validation Rules appeared first on Laravel Daily.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Laravel Auth features a function to redirect logged-in user to the same page they were visiting before. So, for example, if you visit /posts, you get automatically redirected to /login and then enter your data successfully, Laravel will “remember” and redirect you back to /posts instead of default /home. But it doesn’t work with new […]

The post Laravel Auth: After-Registration Redirect to Previous (Intended) Page appeared first on Laravel Daily.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

If you're building a Laravel project with both Web and API sides, you need to customize error messages for each of them separately. In web-view there should be error pages, and API exceptions should return JSON with status codes. How to handle it? I will show you an example with case of Model Not Found 404.

The post Laravel API 404 Response: Return JSON Instead of Webpage Error appeared first on Laravel Daily.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

In typical project with list and pagination, you should have a choice to select, how many entries you want to see per page - 10, 25, 50, 100 etc. That setting probably refreshes the table or the whole page, but how to save it for the next time that user logs in, or visits the page in a week?

The post “Posts Per Page”: How to Save Setting for Every User Individually appeared first on Laravel Daily.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

I was listening to recent podcast by Taylor Otwell, Laravel Snippet episode 11, where he touched on the debate in Laravel community on where you should put your code logic - in Controllers, Models, or Services. Here's what he said.

The post Taylor Otwell: “Thin” Controllers, “Fat” Models Approach appeared first on Laravel Daily.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Quite often I get a question from junior developers like “how to get better at Laravel”, and there’s so much to study potentially that I decided to gather the topics and classify them somehow. Let’s begin. Notice: this is kind of a follow-up on my article How to Test Junior Laravel Developer Skills. Topic 1. […]

The post Advanced Laravel: 14 Topics and Links to Learn Them appeared first on Laravel Daily.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Really popular Laravel Media Library package has one less-known feature - image resizing. The best part is that it's really simple to add, let me show you how.

The post Resize Images in Laravel with Spatie Media Library appeared first on Laravel Daily.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

One of the most common performance issues I've seen in Laravel is using Eloquent methods and relationships from Blade, creating unnecessary extra loops and queries. In this article, I will show different scenarios and how to handle them effectively.

The post Calling Eloquent from Blade: 6 Tips for Performance appeared first on Laravel Daily.

Read for later

Articles marked as Favorite are saved for later viewing.
close
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview