Yii 2 Pretty Urls and Sluggable Behavior

I’m happy to announce another bonus chapter has been added to Yii 2 For Beginners. Everyone who has purchased the book gets free updates for the life of the book, just log into your leanpub.com account and pull down the latest version.

In this update, we focus on having our application use pretty URLs and on using slugs. Pretty Urls get rid of the ?r= syntax and the index.php part of the url. Slugs are strings that get attached the url to make them more visible to a search engine, like so:

yiit2build.com/example/this-is-not-a-real-url-it-is-only-an-example

It’s fairly easy to implement, but there are a lot of little things to get right and we go through all of them for a complete solution.

Also, as I mentioned in my last update, I made sure we were 100% compatible with Yii 2.0.3, which has just been released. I jumped on that on the day of release and everything went smoothly with the update, so no surprises there.

I also included in this update the correct jui DatePicker solution, which works with this update to the framework, so my workaround is no longer needed. A thoughtful reader was kind enough to send in a suggestion that includes setting the year as a dropdown list, so it’s easier to select the year, when you are picking the date. You will love it. That update is at the end of chapter 8.

I’ve decided to write smaller bonus chapters, so I can release the material more quickly. I’m working on a chapter dedicated to Yii 2 authclient and will have that done by the end of the month. This will allow a one-click login or register via facebook and other social networks. It’s an awesome feature of the framework, another reason to absolutely love it.

Thank you to everyone who wrote a positive review at GoodReads.com. Your comments are helpful to people who are thinking about learning the framework.

For anyone who does want to learn Yii 2, the core book is finished and will get you up and running quickly with a reusable template that you can use for your production projects. Since I use the template myself, I’m continuing to add to it, and as I do that, I continue to release bonus material in the book. It’s all free for the life of the book.

Thanks to all the programmers from around the world who are supporting my blog, my book, and participating in the polls. Over 400 people have already voted in the latest Yii 2 vs. Laravel 5 poll and we’re getting some interesting results. Thanks again and see you soon.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s