Web Dev & Design

Laravel Cookies

Laravel Cookies

Using Cookies in Laravel is super easy. Take a look at how we can use cookies in Laravel below:

1. To Set a cookie you can use the following code:

$ref = 'my cookie value';
return redirect('/')->withCookie('ref', $ref);

2. Then to get a cookie value you can do the following:

$cookie = $request->cookie('ref');

And it’s as easy as that. To learn more about laravel cookies you can visit the official documentation.

Additionally you can learn more about Laravel cookies by checking out this video by DevDojo:

Learn how to use laravel cookies

Video Membership Site

How to create a Video Membership Site

Let’s say you wanted to create your own Video Membership site. What would you use for that? Your first instinct might be to go with WordPress and this is definitely a viable solution; however, there are going to be a lot of disconnects and a lot of functionality that doesn’t work just right. Checkout this article about WordPress vs HelloVideo.

Now, thanks to HelloVideo you can easily create your own Video Membership website. The script is very easy to install and very easy to configure. With HelloVideo you have a powerful admin dashboard where you can add/edit/delete videos, posts, pages, and users. You can view statistics about your video site right when you login to your admin dashboard.

video-subscription-site-admin

HelloVideo comes with 3 great themes. Each theme has separate settings that you can modify. You can also add your own custom CSS or Javascript. This app was built to seamlessly integrate with stripe and it was built the latest version of Laravel, Laravel5.

Once you gain access to the download section you will also have access to all the documentation a ton of quick start videos, and all your downloads. You will get free updates and free upgrades for a whole year.

So, if you’re in need of creating an awesome Video Membership Website, do your users a favor and get one of the best Video CMS’s available today.

Check it out at HelloVideoApp.com

use-panda

UsePanda – News & Inspiration for Designers and Developers

One of the tools that I commonly used to stay up-to-date with the latest design and development news is UsePanda. UsePanda can be used as a chrome extension or as a webpage. The chrome extension is great. After activating the extension, every time you open up a new tab, you’re presented with the following screen:

use-panda-screenshot

Every morning you can get up and in front of your computer, with your coffee at your side, as you stay up-to-date by checking out all the links and design inspiration presented through UsePanda. Some may look at this as a distraction, but….. others would say it’s motivation.

UsePanda takes the latest news from many popular technology sites like Designer News, SideBar IO, Hacker News, and so much more. You will also be inspired as you can easily scroll through the most popular design shots from Dribbble, Behance, or Awwwards.

Be sure to download this awesome extension and get inspired :)

wordpress-4

WordPress 4.0 is available!

The latest version of WordPress, version 4.0 is available. You can update to the latest version in your WordPress dashboard or you can download the latest version from http://wordpress.org/. Be sure to get the latest version and here’s what you can expect in 4.0:

New Media Library Grid View

The Media Library gets a new face-lift and provides an easy to sort and view grid.

new-media-library

New Plugin View & Experience

The plugin page is organized more efficiently and has a new view and experience.

new-plugin-view

More support for oEmbed

WordPress now natively supports a wide variety of embed services like Youtube, TEDtv, Vimeo, Flickr, Twitter, SlideShare, and much more. Simply add the URL or embed code and you can see the embed in the live preview and in your post.

support-for-oembed

Choose your language during installation

Throughout the WordPress installation you can choose which language you would like to start with, even before you get wordpress setup:

choose-your-language

Here is the full list of new features included in this latest version:

  • New Media Library Grid Viewer
  • New Plugin View & Experience
  • More support for oEmbed
  • Choose your own Language During Installation
  • Improvements to the Content Editor
  • Improvements to TinyMCE Views
  • New Widget Customizer Panel
  • New Accessibility Features
  • Updated External Libraries

For more info about the latest features be sure to head over to WordPress blog and read up more about it :)

pexels

Pexels.com – Free High Quality Images for your site

Finding the right image for your featured product or the fullscreen background of your website can make or break the viewers perception of your app. That’s why it’s important to find the best high quality images for your app or product website.

There are many places where you can find large high quality background images; however, some of those may not suit all your needs. Sometimes you really need a high quality image that portrays your message.

Well, if you are looking for the right image to give your website personality, you may want to checkout Pexels.com. At Pexels you can search for hashtags to find the perfect high quality image. You can also view the most Popular or the Newest additions.

Be sure to head over to Pexels.com and find the right image for your site :)

whats-new-in-laravel-4-3

Laravel 4.3 – What’s New

There has been a lot of buzz lately about the latest release of Laravel 4.3. Many new features will be introduced in this new version, and it is all being covered over at Laracasts. This is showing to be a larger release than was previously anticipated.

taylor-otwell-tweet-laravel-4.3

Here are a few of the key features that will be introduced in this latest version:

  • New directory structure
  • Method Injection
  • New and improved validation
  • New File Generators
  • Flysystem
  • Socialite
  • Illuminate Contracts
  • Route Caching

Now, I’m not too sure how I feel about the new file structure, already covered in one of Laracasts latest videos: https://laracasts.com/series/whats-new-in-laravel-4-3/episodes/1. I’m sure there’s good reasoning behind it; however, at first glance I’m not too thrilled about this.

There seem to be many other cool features popping up, so since Taylor Otwell has proven good in the past I’ll trust him on the change to the file structure and to all the new features. “Taylor”, thanks for continuing your awesome development on one of the greatest frameworks available.

If you want to catch all the latest features in the latest release be sure to head over to Laracasts, where Jeffrey Way will be teaching us all what we can expect from this next exciting release.

chartist-js

Chartist JS – Simple Responsive Charts

If you are looking for a simple and easy to use responsive chart solution. Chartist JS may be exactly what you are looking for. Chartist JS was created by a community of developers who were unhappy with the current charting systems available today, so you know it’s gotta be good :)

Using Chartist JS is very simple. After you include the library in your project you can easily create bar charts, pie charts, line charts, and so much more. Checkout just how easy it is to create a simple bar chart below:

// Create a simple bar chart
var data = {
  labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
  series: [
    [5, 2, 4, 2, 0]
  ]
};
 
// In the global name space Chartist we call the Bar function to initialize a bar chart. As a first parameter we pass in a selector where we would like to get our chart created and as a second parameter we pass our data object.
Chartist.Bar('.ct-chart', data);

So, be sure to checkout this library if you are looking for a quick and easy solution for great responsive charts. http://gionkunz.github.io/chartist-js/

what-is-polymer

What is Polymer and should I be using it?

Before I get started telling you what polymer is and the cool things you can do with it; it might be best to give you an overview of Web Components, because after you understand Web Components you’ll pretty much understand Polymer.

Web components are a bundle of markup and styles that we can use to create custom HTML elements. For instance we could create a tag like:

<awesome></awesome>

And ‘awesome’ would be our custom HTML element. We can then define a template of HTML, CSS, and Javascript to render our custom element on our page. The great thing about web components is that all of the contents inside of our custom element (also referred to as the ShadowDom) will not be able to mess-up or bleed out to the parent page. This is great because you won’t have any CSS or Javascript conflicts. One custom HTML5 element that may be very familiar to you is the ‘video’ custom element. Shown below:

<video width="300" height="150"> 
  <source src="trailer.mp4" type="video/mp4”>
  <source src="trailer.webm" type="video/webm">
  <source src="trailer.ogv" type="video/ogg”>
</video>

The ‘video’ HTML element is a custom element that is recognized across most modern web browsers. And utilizing web components you are able to create your own custom HTML5 elements.

So, now onto Polymer. Polymer is a javascript library that makes creating these custom html elements easier than ever. With Traditional web components you would have to write a lot of javascript and implement the web component into your webpage. Then you would have to make sure that that custom element worked in most modern web browsers. Well, if you are using polymer you can rest assure that all your web elements will be pollyfilled so that way they are compatible with the latest web browsers.

Using Polymer we can quickly and easily create new web components that people can drop into their webpage and the web component will do it’s own work and display it self accordingly on your page.

Be sure to checkout Polymers website here: http://www.polymer-project.org/ You can checkout some of the cool custom elements that people are already building over at http://www.customelements.io/

Also, be sure to checkout the cool examples on Polymer’s demo pages: 

http://www.polymer-project.org/apps/topeka/

http://www.polymer-project.org/components/paper-elements/demo.html#core-toolbar

And checkout just how easy it can be to include google custom elements on your site here: http://googlewebcomponents.github.io/

There’s a lot of cool things that custom elements are solving. Be sure to read up and learn more about custom elements since this will soon be the future of where web development is heading.

ninja-media-script

Ninja Media Script

Well, it’s been awhile since I’ve written a post. I hope to get back into my daily post routine :) In the meantime I’ve been fairly busy creating some new scripts and learning some new technologies. One of the latest scripts that I’ve written was a Viral Media Script that’s available on CodeCanyon. Feel free to check it out here.

The response has been great so far, I am reaching nearly 250 sales within the first couple months. It’s great to be able to continue to work on something that people care about. Whenever I’m working on updates during the weekend it’s a great feeling to know that I have users who are looking forward to these updates.

The script was built using Laravel 4 framework, Bootstrap 3, FontAwesome4, and jQuery.

Here are some of the screenshots of the script below:

ninja-media-script-screenshot-1 ninja-media-script-screenshot-2 ninja-media-script-screenshot-3

Be sure to check it out on the Envato page here: http://codecanyon.net/item/ninja-media-script/6822888

And I look forward to hearing your feedback :)

OS X and Composer Error ‘PHP.ini does not exist’

So, I finally decided to move away from using MAMP, which is great; however, I am having to do a lot of troubleshooting. After getting my MAMP stack all setup I was adding all my Laravel projects and going to get all the latest vendor resources via Composer. Unfortunately I ran into the following output up trying to install composer:

$ curl -sS https://getcomposer.org/installer | php

Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The detect_unicode setting must be disabled.
Add the following to the end of your `php.ini`:
    detect_unicode = Off

A php.ini file does not exist. You will have to create one.
...

The reason for this could be that you have just activated PHP in your OSX Apache configuration, but you still have not renamed the default php.ini file which is located in ‘/etc/php.ini.default’, so we can easily do that with a single command and add the detect_unicode = Off at the same time:

$ cp /etc/php.ini.default /etc/php.ini && echo "detect_unicode = Off" >> /etc/php.ini

(note: make sure you are logged in as root or you can add sudo in front of the above cp command)

Hope this helps someone out. And I’m pretty sure that moving away from using MAMP, I’m going to learn so much more.