Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Laravel 5.x Cookbook

You're reading from  Laravel 5.x Cookbook

Product type Book
Published in Sep 2016
Publisher Packt
ISBN-13 9781786462084
Pages 402 pages
Edition 1st Edition
Languages
Authors (2):
Terry Matula Terry Matula
Profile icon Terry Matula
Alfred Nutile Alfred Nutile
Profile icon Alfred Nutile
View More author details

Table of Contents (17) Chapters

Laravel 5.x Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Setting Up and Installing Laravel 2. Using Composer Packages 3. Routing 4. Building Views and Adding Style 5. Working with Data 6. Adding Angular to Your App 7. Authentication, Security, and Subscriptions 8. Testing and Debugging Your Application 9. Adding Advanced Features to Your App 10. Deploying Your App Index

Adding a blog area to update users on new features


Laravel is not a CMS, but still, it is really nice to create a simple, markdown-based blog to quickly post updates about latest features and news for the comic site. In this section, I will show how we can use Slugs from the earlier recipe called Adding clean URLs for the users profile page in this chapter, and a markdown library, so we can make a blog area that is paginated and ready to show off our latest info written in markdown and converted into HTML.

Getting ready

A fresh install of Laravel is fine. I will continue on with the comic book site I have been making all along.

How to do it…

  1. Use a scaffolding library that I talked about in Chapter 5, Working with Data:

    >php artisan make:scaffold Blog --schema="title:string, mark_down:text, html:text, active:boolean:default(0), url:string"
    
  2. Make sure your migration ends up looking like this:

  3. Then, I add the controller to my app/Http/routes.php file:

  4. Then, I fix up the views the way I need them...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}