Latest Post

How to get last inserted id in laravel 5?

Its very common need to get last insert id in programming field, if you are working on laravel framework and you want to fetch last created id, i mean max id, then you do easily.laravel provide method to get last inserted id. If you are working with DB::table() then you have to use insertGetId() for insert data into database. this function always return inserted record id(primary key).it is very simple way to get id, in following example you can see and undestand more: <strong>Example:</strong> <pre class="language-php"> public function getLastInsertedIdDB() { $id = DB::table('items')->inser.....

By Hardik Savani | February 6, 2016 | | 19179 Viewer | Category : Laravel
READ MORE

Select only one checkbox at a time using Jquery

If you need to select one checkbox at a time in multiple checkbox, i mean you want to allow anly one checkbox user can check then you can do easily using jquery. jquery prop() through you can give attribute value checked equel to true or false. if you have banch of checkbox like as example, and if you want to check checkbox at time one by using jquery then you can use this code. In following example use for you to do select at a time one. <strong>Example:</strong> <pre class="code language-html"> <html> <head> <title>Select only one checkbox at time</title> <scri.....

By Hardik Savani | February 5, 2016 | | 11563 Viewer | Category : Javascript HTML jQuery
READ MORE

PHP: How to count files in folder?

In PHP, you are work on php and you want to need display count number of files in specific folder then you do, glob() through you count number of file are there in specified folder. now in following example you can see "/var/www/test" in this folder, count how many files are there in that folder. glob function take a two argument first one for directory or folder path and second argument for filter. Filter means if you pass '*' then it will count all type of file, i mean all extension, but if you need to count just text file then you can put like '*.txt'. That't it, if in your directory, func.....

By Hardik Savani | February 4, 2016 | | 1922 Viewer | Category : PHP
READ MORE

How to find day from specific date in PHP?

Whenever you need to det day like Monday, Tuesday etc from full date. i mean you have any specific date like "2015-10-10" and you want to get day then you can do in both way first using strtotime() and second using DateTime object. In Following example you can see i give you both way to get day from your date. now i added format 'l' so it will return full name of day like "Tuesday", but if you want to get short name of day then you can change format like "D". <pre class="language-php"> // Using strtotime() $specificDate = strtotime('2016-2-3'); $specificDate = date('l', $specificDate); var_d.....

By Hardik Savani | February 3, 2016 | | 731 Viewer | Category : PHP
READ MORE

How to push item to 0 index or first of $scope object in AngularJS?

you are working on angular JS and you wanted to add item on top of array, i mean you need to add 0 index of $scope array then you can do. in following example you can see how to do.if you want to push first then you have to use splice() instend of push(). <strong>Example:</strong> <pre class="code language-html"> <html> <head> <title>Angular JS</title> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script&.....

By Hardik Savani | February 2, 2016 | | 1051 Viewer | Category : JSON AngularJS
READ MORE


glob Request Method Commit array_map Algolia Package Undefined Solve Custom Command Executed Jquery Dialog Box MVC PHP artisan parse Convert Capitalize Mail phpmyadmin intervention/image Contact US Form bootstrap-progressbar.js Date Format Vue.JS Command MySql WHERE Query Parameters Socket.io nl2br Letter Force Run Project Flash Message array_change_key_case Animation max_file_uploads Control Trigger String Script Notification Components & Slots Admin Panel Captcha code Object to Array COUNT() Auth softDeletes Repository Pattern select box search read more Update CURL Laravel Builder guzzle http client throttle Last Popup Box File Upload CSS Lightbox React JS hasTable Limit Multi Auth Jquery UI Search Tracking Prompt modal response() AngularJS TrustAsHTML Filter Rewrite Client side validation Where Not In Query yajra/laravel-datatables-oracle First Pixel Config Input HTML Opencart jquery.lazyload.js DB Month After Version Amazon S3 ServiceProvider jquery.email-autocomplete.min.js Query Builder Specific json() AngularJS Element Upgrade Nodejs groupBy() Controluser execute query getQueryLog Sublime text 2 Cross URL Validation Stripe Grayscale Image IP Subscribe Sortable MSSQL file_exists encrypter Global Variable Scroll oauth whitespace Packages mod_rewrite Sub-Domain Calculate Sendgrid Tooltip Count Lavacharts ID Download Custom Special SweetAlert Plugin Ajax PayPal Source Code Parsleyjs Gmail Base URL Allow stevebauman/location composer package Ionic framework SEO Path RSS Feed Automatically Datepicker Installation Laravel 5.4 Protection Ajax Request Resize Image Excel daterangepicker Dialog box