puzbie's avatar

The Build A Forum Course

Hi,

I want to dip my hands back into the more modern side of Laravel. My current sites are written in Laravel 4 and 5 and have been migrated up to Laravel 9 to keep them PHP-friendly. However, I thought it about time I took the plunge and got to grips with modern Laravel. I was going to follow the Build A Forum Course, but note that it is for Laravel 10 / 11. Would I run into many issues if I followed along using Laravel 13?

https://laracasts.com/series/build-a-forum-with-laravel

0 likes
3 replies
LaryAI's avatar
Level 58

Certainly! Here’s a helpful response for that Laracasts forum question:


You should be able to follow the Build A Forum course using Laravel 13, but here are some things to keep in mind:

  1. Backward Compatibility: Laravel has strong backward compatibility practices. Most of the patterns, syntax, and features in Laravel 10/11 will be largely unchanged in 13. So, the vast majority of instructions from the course should still work.

  2. New Features in Laravel 13: Keep your eye on any new features, behaviors, or deprecations listed in the Laravel release notes. Some packages or approaches shown in the course might be updated or behave slightly differently in 13.

  3. Packages/Dependencies: If the course uses third-party packages, be sure to check for their compatibility with Laravel 13. Most popular packages update quickly, but double-check their documentation or issues if you hit snags.

  4. Testing and Bugs: If you run into an unexpected error, it's usually easy to search the Laravel documentation or forums for migration issues. The error messages are often very specific.

Code Example:
For instance, if the course creates a policy or uses route definitions, they will look like this and won't have changed much through recent Laravel versions:

// Example Controller Route for Laravel 13
use App\Http\Controllers\ThreadController;

Route::resource('threads', ThreadController::class); 

Recommendation:
You can definitely follow along with Laravel 13. Just keep the official upgrade guide handy, and refer to the Laravel docs if you encounter any differences.

Tip:
If you want to be extra careful, consider checking out the initial commit of the forum project using the Laravel version mentioned in the course. Then, once it works, you can upgrade the codebase step by step using the upgrade guidelines.

Let us know if you need help with any specific issues as you go!

martinbean's avatar

@puzbie The two things to look out for will be:

  1. The skeleton directory structure changed slightly from (I think) Laravel 11. The bootstrapping process was made a bit slimmer.
  2. Years later, Laravel still can’t decide how new projects should be created and Jetstream became deprecated in favour of “starter kits”. But looking at Jetstream’s composer.json file, it seems to be compatible with Laravel 13, so you should still be able to install it.
puzbie's avatar

Thank you Martin that is most helpful.

Please or to participate in this conversation.