Skip to content

Instantly share code, notes, and snippets.

View rabeeaali's full-sized avatar

Rabeea Ali rabeeaali

View GitHub Profile
@rabeeaali
rabeeaali / IPThrottleMiddleware.php
Last active March 19, 2024 11:05
IPThrottleMiddleware
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Cache;
class IPThrottleMiddleware
{
@rabeeaali
rabeeaali / index.html
Created January 25, 2023 10:23
Customizable From Payment
<div id="new-card-box">
<!-- noon payment form that will hidden -->
<div class="new-card-selection-container" id="new-card-selection-container">
<div class="flex align-center space-between">
<div class="new-card-control-box"
id="new-card-payment-selection-frame">
</div>
</div>
</div>
class ProfileController extends Controller
{
/**
* Get user info
*
* @return UserResource
*/
public function __invoke()
{
return json_response(data: new UserResource(user()));
@rabeeaali
rabeeaali / .buildpacks
Last active July 14, 2022 14:14
Upload Laravel on Heroku (create these three files in the main Laravel's directory)
https://github.com/heroku/heroku-buildpack-php
https://github.com/heroku/heroku-buildpack-nodejs
@rabeeaali
rabeeaali / AWS_S3_WITH_LARAVEL.md
Last active July 10, 2022 10:44
upload files to S3 using Laravel

Steps to upload files to S3 using Laravel

Step 1

install s3 pkg:

composer require league/flysystem-aws-s3-v3
@rabeeaali
rabeeaali / DateConverter.php
Last active May 9, 2024 13:00
Convert Date From Hijri to Gregorian And vice versa
<?php
namespace App\Services;
class DateConverter
{
public static $Day;
public static $Month;
public static $Year;
<?php
namespace App\Helpers;
class Status
{
public const HTTP_CONTINUE = 100;
public const HTTP_SWITCHING_PROTOCOLS = 101;
public const HTTP_PROCESSING = 102;
public const HTTP_EARLY_HINTS = 103;

Adding an existing project to GitHub using the command line

 git init
 git add .
 git commit -m 'First commit'
 git remote add origin <remote repository URL>
 git push origin (master or main)

@rabeeaali
rabeeaali / alias.txt
Created January 21, 2021 23:59
my own alias
// export PATH="$HOME/.composer/vendor/bin:$PATH"
alias cud="composer dump-autoload"
alias a="php artisan"
alias ac="php artisan make:controller"
alias am="php artisan make:model"
alias afs="php artisan migrate:fresh --seed"
alias ao="php artisan optimize:clear"
alias acc="php artisan config:cache"
alias af="php artisan migrate:fresh"
@rabeeaali
rabeeaali / readme.md
Created January 10, 2021 19:48
Global readme file

Title

Description

Steps to install and configure the repo

  1. Go to folder /folder in your Terminal or Command Prompt
  2. Copy .env.example to .env and fill in your database credentials
  3. Run composer install
  4. Run php artisan key:generate