Author: Rifix

Notifications in Laravel 5.3 are incredible. Create a single a notification class, and then designate one or more distribution channels to use – such as email, SMS, Slack, and more. I think you’ll really like this new component, so let’s take a few episodes to review all of its functionality. We’ll start with basic email notifications, and review the nice, fluent API for rapidly building up messages.
Source: Laracasts

This will create a mail message using a nice built-in responsive template that you can publish using the vendor:publish console command.

The notification system will automatically look for an email property in your model, however, you can customise this behaviour by defining a routeNotificationForMail in your Model and return the email address this Model will be contacted on.

Formatting Nexmo SMS Notifications

Same as in the case of an email notification, you need to define a toNexmo method in your notification class:

Built on the Laravel framework, DreamFactory is feature-rich backend solution for real world application development. Instant APIs let you build and iterate fast and the Apache license allows for wide distribution.

DreamFactory Gold is an enterprise solution for fully realized developer ecosystems offering granular user and resource management along with exceptional support direct from our engineering team.

In Laravel 5.3, you’ll find a new toggle() method on all belongsToMany relationships. This solves the issue of needing to delete a pivot table record if it exists, or adding it if it doesn’t. As an example, consider needing to toggle a user’s "like" status for a post.
Source: Laracasts

So you have a single post model, and you want to fetch the username of the most recently published comment. How exactly do we do that? Well, I’ll show you a few techniques you might use, ranging from adding a hasOne relationship, to leveraging the law of demeter, to applying simple joins.

Thanks so much to Wadday Hassan for the question. If the rest of you have any questions that could be answered in video-form, tweet your question and add the hash tag, #helpMeLaracasts.
Source: Laracasts

Freek Van der Herten (@freekmurze) is one of those speakers and he graciously took a break from releasing new packages to allow me the opportunity to ask him a few questions about his talk and the conference experience.

Is this your first Laracon EU?

No, I’ve been the last year’s edition as well and I had a blast there. To be honest it was the best conference I’ve ever been to. The people, the talks, the venue, … it was incredible. The bar is set very high for this edition.

How far away are you from Amsterdam?

I live in Belgium, which is a neighboring country of The Netherlands. From my hometown, Antwerp, Amsterdam is only 2 or 3 hours away by train.

Your Laravel backup package seems to be popular is that what you are going to be giving a talk on?

I’ll dedicate quite some time of my talk to introducing the package. I’ll demonstrate what it can do. Since we’re going to be in a room full of developers I’ll also show the inner workings of the package. But aside from that I’ll also touch on the pitfalls and best practices regarding backups in general and highlight some good backup solutions.

Should everyone be using a backup system outside of what hosting companies provide?

Unless you have a dedicated ops person/team that takes care of backups, you as a developer should definitely take care of your own backups in addition to what your hosting company provides. Take DigitalOcean for example: they provide backups, but they only take a snapshot once a week. So if you solely rely on their backups you could potentially lose data for several days. Most cloud providers store their backups in the same datacenter as your servers. So if the datacenter is down, the backups are unavailable. These are all good reasons to take care of backups yourself.

What other talk are you most excited about?

Sorry, it’s just too difficult to name a single speaker here. I’m looking forward to seeing two my fellow Belgians speaking: Hannes Van de Vreken will talk about cool stuff you can to with the IoC container, Mattias Geniar will explain how Varnish can be used to speed up a site. Also, high on my list is Gabriela D’Avila who will talk about making the most with MySQL 5.7

Any other words of encouragement for those coming to Laracon?

I’m a big fan of uncon’s at conferences and I’m happy this edition of Laracon EU will have one. If you’re not familiar with an uncon, it’s just a room at a conference where everybody is allowed to give a talk. Usually, there’s a big notepad with the schedule in front of the room where you can write down your name and subject of the talk. If you want to learn how to give a talk in public an uncon session is the perfect playground.

Be sure to socialize a bit with your fellow artisans between the talks. It’s incredible how much you can learn from everybody.

Four years ago Laravel News got its start as a simple Twitter and Facebook account where I would share things created by the Laravel community and try to help out the creators as well as users find new awesome stuff. From there it transitioned into a Tumblr site and finally into a full website that’s been running for the past three years.

Back in May Laravel announced that Laravel News would be the official Laravel blog and I didn’t like how my current design looked amateurish compared to the rest of the Laravel sites. To remedy that I partnered up with Zaengle who helped take my ideas and turn it into something that I am extremely happy with and proud to bring to the community.

During this move, I have redone the way the site is powered. Previously it ran on WordPress with a custom theme I put together, it worked fine but added new features, and sections became harder and harder, and I wanted the ability to use what I am comfortable with, Laravel. However, I didn’t want to give up the media library and editing experience of WordPress.

So to have the best of both worlds I kept the old site on WordPress and used the WP Rest API paired with the Laravel Scheduler. This allows me to automatically sync data from WordPress into my database without having to rebuild an entire CMS admin area. I have the same setup for the podcast section, and it hooks into the Simplecast API to pull those over.

I’m sure you think this is crazy and it might be but if you are interested in how it all works let me know and I’ll write up a tutorial. I’m pretty confident only a site ran by a developer would like this setup.

While I was working on all this, I didn’t have time to finish all the sections of the new site. You may notice the community links are missing, and the search is hit or miss. I decided to roll out without these features and will be adding links back soon and better searching once 5.3 is released with Laravel Scout.

I hope you like the new site as much as I do, and I want to thank you all.

P.S. If you spot any errors or problems I setup a new bugs repo where you can submit it.

Today, I’m tinkering around with Turbolinks, which was recently – at the time of this writing – extracted to its own library that may be used anywhere. It’s pretty sweet! Drop it in, and it instantly begins working. All anchor links clicks will be intercepted, and AJAX requests will be sent in their place. This allows for a signifiant performance boost, as the user only needs to download relevant scripts and stylesheets once on the initial page load.
Source: Laracasts

At the moment, we’re hardcoding our database username and password directly within the Connection class. But, we don’t really want to do this. It’s too dangerous. Instead, let’s extract any secret passwords or keys for our app into its own file, and then lock that down.
Source: Laracasts