Code reuse is one of the most important aspects of object-oriented programming. In PHP, you use inheritance to enable code reuse in different classes that share the same inheritance hierarchy. To achieve code reuse, you move the common functionality of classes to method of the parent class. Inheritance makes the code very tightly coupled therefore …
Observers in Laravel
Laravel has a feature called observer. Using observer, we can observe specific model values and invoke callback when their values are changed. We can use them in various purposes, for example logging. For example: imagine there is a product model. when product was created, I need to fetch any things from third-part. In the case, …
Firebase
Firebase is a mobile and web app development platform that provides developers with a plethora of tools and services to help them develop high-quality apps, grow their user base, and earn more profit. Firebase gives you functionality like analytics, databases, messaging and crash reporting so you can move quickly and focus on your users. Ship …
Laravel – Soft Deleting
In addition to actually removing records from your database, Eloquent can also “soft delete” models. When models are soft deleted, they are not actually removed from your database. Instead, a deleted_at attribute is set on the model and inserted into the database. If a model has a non-null deleted_at value, the model has been soft deleted. To enable soft …
apiary.io – online API Desing Stack
Building great APIs is all about effective collaboration. App developers, testers, architects, product managers, clients, and partners all bring unique perspectives to the design of your APIs. We can use this service when designing REST API. There are a lot of services online. But this is free and easy to use.
Laravel Compose
It is a method to insert code snippets to Laravel blade template. In Laravel compose we pass some variables to Laravel blade template and we receive them and compose html in blade template. For example, we can compose nav menu using it. In most sites, nav menu looks different between logged in use and logged …