Learn about my progress!
ACID properties are an important concept for databases. The acronym stands for Atomicity, Consistency, Isolation, and Durability.
The ACID properties of a DBMS allow safe sharing of data. Without these ACID properties, everyday occurrences such using computer systems to buy products would be difficult and the potential for inaccuracy would be huge. Imagine more than one person trying to buy the...
Stripe Integration in Laravel
Stripe is a US technology company, operating in over 25 countries, that allows both private individuals and businesses to accept payments over the Internet.
For integrating Stripe in Laravel, first add the Cashier package for Stripe to your composer.json file and run the composer update command:
Next, register the&nb...
Making Image Uploading Trait in Laravel
For uploading image in laravel we can simply make a trait and use it in any model and do the image upload. We can also do validations on the image which is explained in http://blog.samarthasinha.com/blog/making-validation-trait-laravel and http://blog.samarthasinha.com/blog/using-events-laravel-eloquent link. The code for image validation is below:
Exception Handling in Laravel
Error and exception handling is already configured in laravel project. The App\Exceptions\Handler class is where all exceptions triggered by your application are logged and then rendered back to the user. To send an email when an exception comes write the following codes in your App\Exceptions\Handler class in the report():
public function report(Exception $exception)
Using Events on Laravel Eloquent
Eloquent models fire several events, allowing you to hook into the following points in a model's lifecycle: creating, created, updating, updated, saving, saved, deleting, deleted, restoring, restored. Events allow you to easily execute code each time a specific model class is saved or updated in the database.
Whenever a new model is saved for the first time, the creating, created events wil...
Resourceful Controllers in Laravel
Laravel resource routing assigns the typical "CRUD" routes to a controller with a single line of code. For example, you may wish to create a controller that handles all HTTP requests for "photos" stored by your application. Using the make:controller Artisan command, we can quickly create such a controller:
php artisan make:controller PhotoController...
Stored Procedure in MySQL
A procedure (often called a stored procedure) is a subroutine like a subprogram in a regular computing language, stored in database. A procedure has a name, a parameter list, and SQL statement(s). All most all relational database system supports stored procedure, MySQL 5 introduce stored procedure.
Why Stored Procedures?
Stored procedures are fast. MySQL server takes s...
Facades in Laravel
Facades provide a static interface to classes that are available in the application service container. Laravel ships with many facades which provide access to almost all of Laravel's features. Laravel facades serve as static proxies to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility th...
Abstract Classes and Interfaces
An abstract class is a class that is declared abstract—it may or may not include abstract methods.
You cannot create an object of an abstract class. They can only be inherited and by another class. An abstract method is a method that is declared but not defined, like this:
abstract function xyz();
If you want to create an abstract function you have to declare that cl...
Artisan Commands in Laravel
Artisan is the command-line interface included with Laravel. It provides a number of helpful commands that can assist you while you build your application. To view a list of all available Artisan commands, you may use the list command:
php artisan list
Every command also includes a "help" screen which displays and describes the command's available arguments and options. To vi...