Page 2 - Laravel
-
- February 15, 2016
I'm using PHP's built-in DOMDocument() class to do some simple web-scrapping. However, it works on my 4.2 site, but not my 5.1 (both are on same installation of PHP).
Here's the error:
$list1 =new DOMDocument();In Laravel 5.1 you must prefix the class name with the global namespace prefix '\'.
$list1 =new \DOMDocument(); -
- September 15, 2015
This script quickly adds a Magento Admin user directly into the database. It is possible to run this script from the command line or by copying and pasting into phpMyAdmin. Just make sure to edit the following fields with your personalized data and import. Most of these fields are trivial, I’m just listing them so you don’t miss anything.
- Set the salt portion of your password. You’ll rarely need to change this. If you do, just use two lower case letters of your choice.
- Set your password. At least 8 characters in length and at least one digit.
- Firstname: Enter admin’s first name.
- Lastname: Enter admin’s last name.
- Enter email of admin user.
- Enter username where ‘myuser’ is set. Notice ‘myuser’ shows up in two places.
- Enter Firstname again. This is more symbolic to label the rule.
-
- September 05, 2015
Introduction:
Few days ago I received a comment from one of the reader of my blog to show an example on CRUD (Create, Read, Update and Delete) with the database. So in this post we will explore the use of CRUD operation using SQLite database in PhoneGap application.Description:
CRUD can be described as a process, which helps the user to add, view, search and modify the information inside the database.Here are the basic steps which demonstrates CRUD operation.
- Create or add new entries
- Read, retrieve, search or view existing entries
- Update, modify or edit existing entries
- Delete, deactivate or destroy existing entries
Before doing any operation on database let’s initialize the database first, either using HTML5 local database concept or using SQLite plugin.
Let’s add the following javascript to initilze the database.
var databaseName ="DummyDB";var databaseVersion ="1.0";var databaseDisplayName ="DummyDatabase";var databaseSize =2*1024*1024;var myDB ="";//Accessing -
- August 04, 2015
Remove selected table insert content from dump file
grep -v "INSERT INTO \`big_table\`" dump.sql > dump_stripped.sql
Remove all insert content from dump file
grep -v "INSERT INTO" dump.sql > dump_stripped_insert.sql
Replace dump.sql with your dump file name
-
- July 08, 2015
Magento Product email Notification to send mail to subscriber to new product created and every time
product save with the price changes . You can alert your subscriber about the your new product or
the product price change . It have the following option to send notification .- Have an enable/disaple notification .
- Generate your own design email template .
- Email from name .
- Email from your email .
It have the feature to send newsletter of product notification manualy .
Feature
- Working with magento newsletter .
- Send mail to every subscriber.
- First time product save after "Mage Product Email Notification" extension installed .
- Every time product price changed increase or decrease .
- Mail sent only a product visibility "Enables" & Product have a stock .
- Manual send Newsletter of product notification .
- Related Product also added to email .
- Manual feach the subscriber log .
- Cron to Send mail .
- limit Daily mail .
- Limit to Daily mail per eamil .
- Limit to Mail Per cron .
- Send Mail by Email Order
-
- March 17, 2015
We are using VtigerCRM on our local server which provides ldap authentication for http access, also have the customer portal of vtiger on another machine.
When customer portal connects to the server, this authorization problem occurs. The complete error is pasted
Solution
For your login failure you must turn off your error report in vtigerCRM .
open
config.inc.phpadd or change the error_reporting value
error_reporting(0);
-
- January 30, 2015
RESTful API's are hard! There are a lot of aspects to designing and writing a successful one. For instance, some of the topics that you may find yourself handling include authentication, hypermedia/HATEOS, versioning, rate limits, and content negotiation. Rather than tackling all of these concepts, however, let's instead focus on the basics of REST. We'll make some JSON endpoints behind a basic authentication system, and learn a few Laravel 4 tricks in the process.
The App
Let's build an API for a simple Read-It-Later app. Users will be able to create, read, update and delete URLs that they wish to read later.
Ready to dive in and get started?/** * Setup the layout used by the controller.
* *@return void
*/
protected function singleadmin() {
$Feeds_return = array();
$data = array();
$response = [ 'admins' => [] ];
try {
if($_REQUEST['security_token'] == $this->token_security) {
$cache_key = 'admin_id_'.$_REQUEST['admin_id'];
if( !Cache::has( $cache_key) ) {
$statusCode = 200;
$Admin =
-
- January 30, 2015
//Setup route example Route::get('/myapp/install/{key?}', array('as' => 'install', function($key = null) { if($key == "appSetup_key"){ try { echo '<br>init migrate:install...'; Artisan::call('migrate:install'); echo 'done migrate:install'; echo '<br>init with Sentry tables migrations...'; Artisan::call('migrate', [ '--package'=>'cartalyst/sentry' ]); echo 'done with Sentry'; echo '<br>init with app tables migrations...'; Artisan::call('migrate', [ '--path' => "app/database/migrations" ]); echo '<br>done with app tables migrations'; echo '<br>init with Sentry tables seader...'; Artisan::call('db:seed'); echo '<br>done with Sentry tables seader'; } catch (Exception $e) { Response::make($e->getMessage(), 500); } }else{ App::abort(404); } } }));