Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Michael Dyrynda:
Elegant form handling in Laravel
Jun 01, 2017 @ 14:26:26

Michael Dyrynda has written up a new post for the Laravel users out there showing an elegant form handling method he's come up with that doesn't involve the use of the older version of the Laravel Collective HTML package.

On episode 28 of the North Meets South Web Podcast, Jake and I were discussing packages that we always pull into our Laravel projects. Jacob mentioned that he still uses the Laravel Collective HTML package, which was forked from the functionality that was present before Laravel 5, which is something I suggested I hadn't done for a long time.

[...] Jacob went on to explain that a big part of using the form package is because it handles binding form data directly to the forms for you, allowing you to separate form inputs from the create / edit components themselves. [...] I suggested that you can go about this simply enough in your applications by using a combination of the old() helper method and an empty model.

He includes code examples of both ways to generate the form, first using the Collective package then using just the old() helper function to repopulate the form values when the page is rendered. He points out that using this internal method doesn't require yet another package. There are some niceties that are missed with going with the old() method, but there are benefits too.

tagged: laravel form handling package collective tutorial old

Link: https://dyrynda.com.au/blog/elegant-form-handling-in-laravel

Laravel News:
New community project Laravel Collective
Feb 09, 2015 @ 17:56:47

A new project has been launched in the Laravel community to try to maintain some of the core Laravel components that have been deprecated by the framework - the Laravel Collective.

The Laravel Collective is a new Laravel community organization headed by Adam Engebretson and Tom Shafer. It’s primary goal is to help maintain the core Laravel components that have been deprecated by the framework. Currently the packages the Collective is taking over is HTML/Form and Annotations. They have a new site in the works which, when launched, will have complete documentation, team information, and more information on the packages. Until it’s launched you can check out their GitHub repository.

The full project hasn't launched yet, but if you're interested in becoming a part of it, you can sign up for their newsletter and get updates as they're posted.

tagged: laravel collective deprecated package maintain

Link: http://laravelcollective.com

Dave Gardner's Blog:
Applying collective intelligence to PHP UK Conference 2011
Mar 02, 2011 @ 17:08:27

Dave Gardner has put together a post about some work he did with the Joind.in API (an event feedback site) to apply collective intelligence to the results of the PHP UK Conference.

The term "collective intelligence" refers to intelligence that emerges from the collaboration of a group. In this case, we can leverage the data within joind.in and make "intelligent" recommendations. This post looks at building a simple recommendation engine using the data from joind.in. You can download the entire source code here (gzipped) or view via PasteBin here and try it out for yourself.

His code connects to the Joind.in API and fetches the event's talk information and the comments for each. His "calculatePearson" function then takes in two users and the set of ratings to figure out how similar their preferences are. There's also a bit of code that approaches it from a different angle - providing recommendations for users based on their own comments.

tagged: collective intelligence joindin api rating download

Link:


Trending Topics: