Laravel

With Bootstrap 4 now in beta, many people are beginning to switch their projects over to V4. Obviously the migration process requires changing existing markup, which you can learn more about in the official guide), but for this guide I'll only be covering how to integrate it in your Laravel Mix build process. Remove the old Bootstrap dependency To remove the old dependency, we just need to run this command in our project directory: npm uninstall bootstrap-sass --save-dev Install the beta dependencies We'll need to install both the Bootstrap 4 beta as well as Popper.js (used by Bootstrap for…

One of the many useful features of Eloquent is the ability to define accessors and mutators. Mutators can help you if there's something you'd like to do with a value (like hashing a password) every time it gets set on your model. Accessors are for doing something every time you retrieve an attribute (like converting markdown to HTML). You can even use an accessor to dynamically create additional properties on your model (like a full name that concatenates first and last names). Those are great features, but we also have attribute casting so we can convert attributes to common data…