Posts

Showing posts from 2018

Force git to add dotfiles to repository

how would you add files which are started with dot(hidden files) in git repo? when i am new at git , I also faced the same problem,  as usual search on internet especially in stackoverflow.com i found the following question with a number of answer I got the same question on stackoverflow.com. following is query description stackoverflow.com query When I type "git add .", dotfiles in GIT_DIR are added, but not from subdirectories. On the other hand, "git add subdir/.dotfile" won't work. I tried "git add -f" and putting "!.*" in GIT_DIR/.git/info/exclude.  Here is the answer you can simply type below command and hit enter git add */.* or find . -name '.[a-z]*' -exec git add '{}' ';'

Laravel 5 Failed opening required bootstrap/../vendor/autoload.php

Image
Question description  I have recently installed Laravel 5.4 via composer. then after trying to run the project. I am getting the following issue. If you are simply hitting url you are getting following think as the issue Warning : require(C:\xampp\htdocs\laravelecommerce\golmarket\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in  C:\xampp\htdocs\laravelecommerce\golmarket\bootstrap\autoload.php  on line  17 Fatal error : require(): Failed opening required 'C:\xampp\htdocs\laravelecommerce\golmarket\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in  C:\xampp\htdocs\laravelecommerce\golmarket\bootstrap\autoload.php  on line  17 If you are going through Artisan Console then following this showed up. Laravel 5 Failed opening required bootstrap Following is the solution Answer: down vote I encountered the same problem. It occurred because the composer was not able to install the dependencie

Where is the security section of google analytics? “Security Issues” section.

Accessing the securty issues tool is done from within the search properties section that you register. For ease of use you can go to  https://www.google.com/webmasters/tools/security-issues  which will link you directly to the security issues section of GWT however you will have to have added your website as a property already within GWT and gone through the steps to validate the site. You don't mention if you have actually registered the site in GWT or not so basically... Log into Google Webmaster Tools Register your site using all possible validations including http, https (if used), www, and non www versions of your site You will be given several methods of validation and you have to pick one. These include adding a meta tag to your site pages, adding a file with a special filename to the site root, adding a DNS entry to your DNS zone file. You need to choose one of these options and follow the instructions to validate the property to your GWT account. Once validated it

Get only domain name from email using PHP.

Image
Sometimes you need to extract domain name from email using PHP for whatever reason, in that case you can use code sample :

How can I debug PHP cURL sessions?

Setting CURLOPT_HEADER and CURLOPT_VERBOSE to 'true' are two of the most important ways to debug PHP cURL sessions.  Detailed Description PHP’s cURL library is widely used by PHP applications to communicate with the eBay API. However, debugging cURL sessions can be problematic.  Since many of eBay’s services require proper information in the HTTP headers, verifying correct header transfer is important. This can be done by setting the CURLOPT_HEADER to 'true'.  Setting CURLOPT_VERBOSE to 'true' will display two-way communication between the PHP application and the server.  You can also use curl_getinfo to get error messages.  Sample Code and Session for CURLOPT_VERBOSE <?php $headers = array ( 'X-EBAY-API-COMPATIBILITY-LEVEL: 507', 'X-EBAY-API-DEV-NAME: ABCD', 'X-EBAY-API-APP-NAME: EFGH', 'X-EBAY-API-CERT-NAME: IJKL', 'X-EBAY-API-SITEID: 0', ); $session = curl_init(); curl_setopt($session, CURLOPT_URL, &

Simple Laravel CRUD with Resource Controllers

Image
Creating, reading, updating, and deleting resources is used in pretty much every application. Laravel helps make the process easy using resource controllers. Resource Controllers can make life much easier and takes advantage of some cool Laravel routing techniques. Today, we'll go through the steps necessary to get a fully functioning CRUD application using resource controllers. For this tutorial, we will go through the process of having an admin panel to create, read, update, and delete (CRUD) a resource. Let's use  nerds  as our example. We will also make use of  Eloquent ORM . This tutorial will walk us through: * Setting up the database and models * Creating the resource controller and its routes * Creating the necessary views * Explaining each method in a resource controller Table of Contents   Getting our Database Ready   Eloquent Model for the Nerds   Creating the Controller   Setting Up the Routes   The Views   Making It All Work Together   Conclusion