Posts

Showing posts with the label HTML

หน้าล็อกอิน Authentication Login manual บน Laravel 5

Authentication Login manual 1. Create controller cmd command Or custom create php file สร้างไว้ที่ App\Http\Controller\AccountController.php php artisan make : controller [Name]Controller code: AccountCobtroller.php <?php namespace App\Http\Controllers; use Input; use Session; use Auth; use View; use Hash; use App\Account; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Facades\Redirect; class AccountController extends Controller { public function __construct() { // } /**********************************************************************/ /*******************************Login**********************************/ /**********************************************************************/ public function getLogin() { if (Auth::check()) { // return Redirect::to('')->with('success', 'You are already logged in'); retur...

How To Build Tag Input Autocomplete Suggestions with Tokeninput

Image
How To Build Tag Input Autocomplete Suggestions with Tokeninput Tag-based input fields are becoming more common amongst social networks. Also consider new applications such as user-submitted news which provide another method for predefined tags. There are other plugins available which display tag choices in a formatted list using a typical input field. But in this tutorial I want to showcase how we can include autocomplete suggestions generated from a list of JSON queries. I will be using the  jQuery Tokeninput plugin  which is free and open source to use within any project. This plugin only works with a set of predefined tags in a list, so it isn’t the perfect solution. But it does help when you need to limit user selection since it can pull results from a database via AJAX. Live Demo  –  Download Source Code Getting Started First we need to download a copy of the plugin files to copy over into your working directory. I have made two n...

วิธีใช้ header, hgroup และ h1 – h6 elements ใน html5

Image
วิธีใช้ header, hgroup และ h1 – h6 elements ใน html5 หลังจากที่ผมได้พูดถึง “ การใช้ article, section, nav, aside ใน HTML5 ” ไปแล้ว คราวนี้มาถึงคิวของการใช้ header กันบ้างครับ บางคนอาจมองว่าเรื่องนี้เป็นเรื่องง่ายๆ แต่ผมกลับมองว่าทุกวันนี้ ยังมีการใช้ header ที่ยังไม่ค่อยจะเหมาะสมอยู่เยอะเหมือนกัน บทความนี้ ผมจะอธิบายวิธีการใช้ header element ละ elements ที่เกี่ยวข้องอื่นๆ รวมไปถึงตัวอย่างการใช้งาน และเทคนิคต่างๆ ที่จะช่วยให้เราเขียนโค้ดได้อย่างถูกต้องและเหมาะสมมากขึ้นครับ ใส่หัวข้อให้กับเนื้อหาด้วย h1, h2, h3, h4, h5, h6 h1 ถึง h6 elements จะใช้กับส่วนที่เป็นหัวข้อของเนื้อหาภายใน section นั้นๆ ครับ ซึ่งเราสามารถกำหนดความสำคัญให้กับหัวข้อของเราได้ โดย h1 จะเป็นหัวข้อที่มีความสำคัญมากที่สุด และ h6 จะเป็นหัวข้อที่มีความสำคัญน้อยที่สุดครับ 1 2 3 4 <article>      <h1> วิธีการใช้ h1, h2, h3, h4, h5, h6 </h1>      <p> h1 ถึง h6 elements จะใช้ mark up ส่วนที่เป็นหัวข้อของเนื้อหาภายใน section นั้...