Laravel belongsToMany Example

laravel belongs to many

Let’s talk about the belongsToMany relationship. Recently we created a really cool introduction to creating a link sharing website in Laravel. The tutorial covers many concepts including routing, models, controllers, and view creation. We even covered some basic relationships in Eloquent. One thing we didn’t cover was applying many to many relations using the belongsToMany method. Let’s see how we might go about doing this now.…

Build A Link Sharing Website With Laravel

Building your own applications, even on a simple or small scale, is a great way to build your skills. This Link Sharing Website tutorial using Laravel will help us to do just that. If you’d like to save yourself a little time, you could just as easily head on over to http://www.easylaravelbook.com/ and pick up a great pre written application, PHPLeaks. PHPLeaks is a Link Sharing Website that has everything you need to get a nice starter project going.…

What Is Middleware In Laravel 5?

What Is Middleware In Laravel 5

So just what is Middleware in Laravel 5? As we know, Laravel five actually ships with an implementation of Middleware in the use of setting up an Authentication service like we discussed in our introduction to Laravel 5. Once you start digging into how middleware works in Laravel 5, you’ll find it to be an invaluable resource for gaining a fantastic level of control over your application.…

Laravel hasMany and belongsTo Tutorial

Laravel hasMany and belongsTo Tutorial

The Laravel hasMany and belongsTo relationships are a fantastic feature of the framework. Relationships, and specifically Eloquent Relationships, are a really popular feature of Laravel. The many to many relationships tutorial here at Vegibit is always the number one or two most popular post as you can see on the right hand side of this page. In this episode, we’re going to show some love to the hasMany and belongsTo relationships that Eloquent provides.…

Laravel Migration Generator

Laravel Migration Generator

In this tutorial, we’ll work with a Laravel Migration Generator. When generating our migrations, it can sometimes be a bit confusing as to the correct way to add columns or fields to our tables. There are a large amount of methods to use within the Schema and Blueprint classes to wrap our heads around. Many times, you might even have a database in place, but you would like to move this instance to another host, or simply have a blueprint of the database in a set of migration files.…