Design-PatternsDecorator Pattern: suppose you want to have burgers with your friends The burger cost you $4 //initial price with initial burger structure or basic price basic burger structure but you want to add some extra things like , cheese , sauce , meat etc he...Aug 11, 2024·2 min read
SOLID Principles OverviewSingle Responsibility Principles : .A Class should have only one(single) reason to change. .A Class should only have one(single) responsibility and be focused on doing only one(single) thing well. ***Single Class should contain Single Responsibility*...Jun 14, 2024·4 min read
Random Things/Tricks I Have learned Todayrollback and remigrate a table from middle of the folder in laravel 10 using these commands Rollback Command: php artisan migrate:rollback --path=\database\migrations\2024_05_16_094227_create_cloth_types_table.php Remigrate Command: php artisan migra...Jun 4, 2024·1 min read
Laravel-mysql-one-to-many-relationship.To understand one to many relationship we need two example tables , let take two table named blog_posts and comments. now we will make necessary columns for blog_posts table Schema::create('blog_posts', function (Blueprint $table) { $table->...Jun 4, 2024·3 min read
Query-builder-in-laravelnotes for some essential query builder methods. we will use users and posts table for applying q-builder methods user table : Schema::create('users', function (Blueprint $table) { $table->id(); $table->string('name'); ...Apr 26, 2024·6 min read
php-basics-revision [topic-name: traits,static methods and properties]traits: php only supported single inheritance , a child class can inherit from one single Parent class ,if we need multiple behaviours from more then one class,traits solve this problem . trait message1 { public function msg1() { echo...Apr 13, 2024·2 min read
php-basics-revision [topic-name: inheritance,abstract class,Interfaces ]inheritance: when a class derives from another class , parent class and child class relationship between them , relation stablished with a keyword named "extended" , child extends parent's public and protected properties, can modify with own setter m...Apr 12, 2024·6 min read