Open in app

Sign In

Write

Sign In

Safaetul Ahasan
Safaetul Ahasan

82 Followers

Home

About

Jan 24

Laravel Advance | Return type

In Laravel, some common return types that can be used in method signatures include: — string int float bool array model_name Collection void Carbon Response RedirectResponse View //->view('wlcome') ?string //null or string string - A string value. For example: public function getName(): string { return "John Doe"; } int - An integer value. For example: public function getAge(): int { return 25; }

Laravel

2 min read

Laravel

2 min read


Jan 24

Laravel Advance | Model’s properties for better code.

$fillable $hidden $guarded $appends $with $timestamps $dates $casts $primaryKey $incrementing $keyType $table $connection $touches $attributes: $fillable: An array of properties that can be mass-assigned. class User extends Model { protected $fillable = [ 'name', 'email', 'password', ]; } 2. $hidden: An array of properties that should be hidden when the…

Laravel

4 min read

Laravel

4 min read


Jan 22

Laravel advanced | Traits

In Laravel, traits are a way to reuse common functionality across multiple classes. A trait is similar to an abstract class, but it cannot be instantiated on its own. Instead, it is used to add methods to existing classes. Here is an example of a trait in Laravel: <?php namespace App\Traits; trait…

Laravel

1 min read

Laravel

1 min read


Jan 21

Laravel advanced Eloquent | eager loading

According to this relationship: class User extends Authenticatable { public function posts() { return $this->hasMany(Post::class); } } class Post extends Model { public function user() { return $this->belongsTo(User::class); } public function comments() { return $this->hasMany(Comment::class); } } class Comment extends Model { public function post() { return $this->belongsTo(Post::class); } }

Laravel

3 min read

Laravel

3 min read


Jan 20

How many ways to Point domain ec2?(Part 1)

There are several ways to point a domain to an EC2 instance, including: Using Route53: You can use Amazon’s Route53 service to manage your domain’s DNS settings and point your domain to your EC2 instance. Using an Elastic IP address: You can associate an Elastic IP address with your EC2…

AWS

1 min read

AWS

1 min read


Jan 3

7 Optimization Techniques in Laravel

There are several techniques that you can use to optimize the performance of your Laravel application: 1. Use indexing. 2. Use caching. 3. Use eager loading. 4. Use Queues. 5. Laravel Debuger. a. Use the ORM efficiently. b. Use the debug bar. c. Use profiling. d…

Laravel

5 min read

7 Optimization Techniques in Laravel
7 Optimization Techniques in Laravel
Laravel

5 min read


Jan 3

Laravel debug bar

To use the Laravel debug bar, you will need to install the laravel/ui package and the barryvdh/laravel-debugbar package using Composer: composer require laravel/ui barryvdh/laravel-debugbar --dev Next, you will need to publish the assets for the debug bar using the vendor:publish Artisan command: php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider" Then, in your config/app.php…

Laravel

1 min read

Laravel debug bar
Laravel debug bar
Laravel

1 min read


Dec 28, 2022

Database Consistency

Pessimistic locking is a concurrency control method that prevents multiple transactions from accessing the same data simultaneously. When a transaction acquires a lock on some data, other transactions are prevented from accessing that data until the lock is released. …

Database

5 min read

Database

5 min read


Dec 21, 2022

Laravel Query for best performance.

There are several ways you can improve the performance of a query in Laravel: 1. Use eager loading.(***) 2. Use cache.(***) 3. Use index.(***) 4. Use raw SQL(quer()) 5. Use explain 6. Laravel Parameter Binding Use eager loading: When retrieving data from multiple tables, you can use eager loading to…

Laravel

3 min read

Laravel

3 min read


Dec 21, 2022

Database Scaling

Scaling a database is the process of increasing the capacity and performance of a database to handle a larger volume of data and requests. There are several approaches to scaling a database, and the specific steps you should follow will depend on your database and the specific requirements of your…

Databse

7 min read

Database Scaling
Database Scaling
Databse

7 min read

Safaetul Ahasan

Safaetul Ahasan

82 Followers

Senior Software Engineer

Following
  • React Developer

    React Developer

  • Dibakar Sutra Dhar

    Dibakar Sutra Dhar

  • Rafi kadir

    Rafi kadir

  • Semyon Kirekov

    Semyon Kirekov

  • Bennett Garner

    Bennett Garner

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech