Skip to content

Instantly share code, notes, and snippets.

View aniket-magadum's full-sized avatar
Playing with code

Aniket Magadum aniket-magadum

Playing with code
  • Mumbai,India
View GitHub Profile
@aniket-magadum
aniket-magadum / AppServiceProvider.php
Last active April 4, 2024 15:37
RequestHandled Event in Laravel
<?php
namespace App\Providers;
use Event;
use Log;
use Illuminate\Foundation\Http\Events\RequestHandled;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@aniket-magadum
aniket-magadum / 01-README.md
Last active April 4, 2024 15:36
Command Finished Event In Laravel

Steps for logging a command in Laravel.

First we will create a custom command which we will run to demonstrate the logging

php artisan make:command CustomCommand 

Also we will create a model and migration file together

@aniket-magadum
aniket-magadum / 2023_11_01_025054_create_http_logs_table.php
Last active December 16, 2023 21:22
Laravel Logging Http Client Request and Response
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
@aniket-magadum
aniket-magadum / laravel.md
Last active August 7, 2023 17:56
Software Rule Book
  1. Always make use of migrations when working with a laravel application.
  2. Make use of Model Events and events in general wisely as it may cause bugs which are very difficult to reproduce and also can be very nasty.
@aniket-magadum
aniket-magadum / README-Template.md
Created August 31, 2019 10:41 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@aniket-magadum
aniket-magadum / .htaccess
Created May 11, 2019 15:08
.htaccess file for removing index.php from codeigniter . It uses the mod_rewrite PHP extension.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>