Introduction

Swift is a new programming language for iOS, MacOS, watchOS, and tvOS apps that build on the best of C and Objective-C, without the constraints of C compatibility. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun. Swift’s clean slate, backed by the mature and much-loved Cocoa and Cocoa Touch frameworks, is an opportunity to re-imagine how software development works.

Read More

The need of helpers

For developing a Magento website, we often need some functions to be called all over the website. For that purpose we create helper class and helper functions inside the helper class.

What are helpers

As the name suggests, a “helper” is something that is done to help! It is an object that contains functions that are going to be practical and you can call from anywhere. Helpers are classes that provide functionalities for various features throughout the Magento website. We can use them in controllers, views, models and even in other helpers. Helpers are just collections of unrelated methods and are always instantiated as a singletons. Also Magento requires a helper for each module for translation reasons. You can just create a helper called Data.php in each module and leave it empty.

Read More

On developer view we faced below issues

1. Composer

Its nothing but helpful to import the dependancy libraries.
Please follow below steps if the composter not installed in machine.

2. PHP version update

We were running almost magento stores with Ubunutu 12.04. It was running with PHP 5.3, so we have to do a manual update for upgrade process.

Read More

Swift is an innovative programming language from apple. Swift has been introduced along with the release of iOS 8 and Yosemite. It offers a very faster and easier way to build iOS applications than its existing programming language, Objective-C.
It is a multi-paradigm programming language.Apple describes Swift as modern, fast, powerful, safe and interactive programming language.
swift_tut
If you have knowledge in object oriented and functional programming, you can learn it easily.Swifts’s syntax is much more succinct and it makes programming simpler .The code is clean, simple and less vulnerable to errors.

Comparison between Objective C and Swift

Swift offers type inference by introducing ‘Var’ keyword, while ObjC does not. Another main feature of Swift is generics but objective C does not have this feature. With Objective-C developers often needed to find separate codes from other libraries but in Swift you can find a lot of functional codes built in.

Read More

A Laravel migration is stored in your application’s app/database/migrations folder. Each file deal with some set of chnages for the corresponding databases. Changes to the database are made in PHP rather than a database-specific flavour of SQL. Your PHP migration code ends up being converted into the DDL specific to your current database; this makes switching database platforms very easy. Since migrations are kept in their own directory, it’s pragmatic to include them into version control just like any other project code. Laravel migrations are run explicitly from command-line using the artisan tool.

Now we have to deal with migration:
We are going to use Laravel’s command line tool artisan to create our new migration. To run artisan you will need to open a terminal to the root of your Laravel application folder where the artisan script exists. The first thing we need to install the migration table, so that Laravel can keep track of which migrations have been run. Run below command to create the special table in database.

If success, artisan will respond with a message “Now we’re ready to do some migrating!” and you can see database table “migrations”. You don’t need to be overly concerned about the table. This is simply a table that helps Laravel to keep tabs on the migrations that you have and have not run. When you add new migrations, artisan migrate will check the migrationstable and execute all migrations that have not yet run.

Read More

Model (Eloquent ORM)
The Eloquent ORM is responsible for the database operations(Model). By using this we can avoid the sql quering. The eloquent model files are placed in app/model directory. Every databse table have a eloquent file.

Here this eloquent will deal with the ‘my_users’ table in database. If we do not specify the table here then laravel will take the plural form of the class name as the table name ie, here it is ‘users’.

We can access a model function by calling in the following manner:
Display corresponding model values: $model = User::display()
Insert value to database:
$user = new User;
$user->name = ‘Test Name’;
$user->save();

Insert value in database using ‘create’ method:
$user = User::create(array(‘name’ => ‘Test Name’)); // Create a new user in the database.
$user = User::firstOrCreate(array(‘name’ => ‘Test Name’)); // Retrieve the user by the attributes, or create it if it doesn’t exist.
$user = User::firstOrNew(array(‘name’ => ‘Test Name’)); // Retrieve the user by the attributes, or instantiate a new instance…

Updating a database values:
$user = User::find(1); //load record by id
$user->email = ‘[email protected]’; //load new value
$user->save(); //update new value

Delete record:
$user = User::find(1); //load record by id
$user->delete(); //delete record

Read More

Laravel is a free,open source PHP web application framework, designed for the development of MVC web applications. Laravel, being a web application framework with expressive, elegant syntax. Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications.
Some features of laravel:

  • Easy and convenient templating using Blade, a great templating engine built for Laravel.
  • Awesome routing facilities.
  • Eloquent, an elegant and one-of-a-kind object-relational mapper.
  • Artisan, Laravel’s amazing CLI, which helps with database migrations, project management, and so on … you can even create your own commands.
  • A modular architecture powered by Composer, which makes it easier to build scalable and less coupled apps.
  • Amazing documentation.
  • An active and supportive community.
  • Marvelous testing facilities to make sure your apps are doing what you think they are etc.

Eloquent Driver: It is driver provided by laravel. Eloquent is also the name of the ORM which Laravel provides, for abstracting model data. It is similar in that it will ultimately query a database to determine whether a user is authentic, but the interface which it uses to make that determination is quite different from direct database queries. If you’re using Laravel to build medium-to-large applications, then you stand a good chance of using Eloquent models to represent database objects.

Read More