Skip to content

Instantly share code, notes, and snippets.

View abdulbasit-dev's full-sized avatar
🎯
Learning

Abdulbasit Salah abdulbasit-dev

🎯
Learning
View GitHub Profile
@abdulbasit-dev
abdulbasit-dev / index.html
Created May 15, 2024 09:51
Toggleable Blur Effect with Click
//html
<div class=" blurOverlay2 pointer " onclick=" toggleBlurOverlay(this);">520052</div>
//css
.blurOverlay2 {
filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius='3');
-webkit-filter: url(#blur-filter);
filter: url(#blur-filter);
-webkit-filter: blur(3px);
filter: blur(3px);
@abdulbasit-dev
abdulbasit-dev / LaravelWhereLikeMacro.php
Created December 4, 2023 06:21 — forked from MrPunyapal/LaravelWhereLikeMacro.php
Laravel Custom 'whereLike' Macro for Dynamic 'LIKE' Searches including relationships
<?php
use Illuminate\Support\ServiceProvider;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Arr;
class AppServiceProvider extends ServiceProvider
{
// ...
@abdulbasit-dev
abdulbasit-dev / XamppVirtualHost.md
Last active January 24, 2023 17:45
Add Vertual Domain In Xampp In Windows

Add Vertual Host

follow below stpes to add vertual host in xammp:

  • Go to C:\Windows\System32\drivers\etc open hosts file, in there add new line write: 127.0.0.1 domain.test
  • Go to C:\Windows\System32\drivers\etc open httpd-vhosts.conf file, in last line add those code and modify it according to your domain
@abdulbasit-dev
abdulbasit-dev / bash.bashrc
Last active August 3, 2023 08:24
laravel aritisan command shourt cut for git bash, for windows put in this file "C:\Program Files\Git\etc\bash.bashrc"
alias pa="php artisan"
alias pas="php artisan serve"
# migration
alias pamm="php artisan make:migration"
alias pam="php artisan migrate"
alias rollback="php artisan migrate:rollback"
alias status="php artisan migrate:status"
alias pamf="php artisan migrate:fresh"
# seed
alias seeder="php artisan db:seed"
@abdulbasit-dev
abdulbasit-dev / controller.model.stub
Last active September 18, 2022 06:25
boilerplate for laravel resourse controller with api
<?php
namespace {{ namespace }};
use {{ namespacedModel }};
use {{ rootNamespace }}Http\Controllers\Controller;
use Illuminate\Http\Request;
class {{ class }} extends Controller
{
@abdulbasit-dev
abdulbasit-dev / remove-compiled-views.php
Created July 4, 2022 06:00
how to remove compiled views form git and add in git ignore in laravel
// 1- add this to the root .gitignore file
// /storage/framework/views
// 2- run this in the terminal to remove compiled views in git cache
// git rm -r --cached storage/framework/views
$months = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
@abdulbasit-dev
abdulbasit-dev / controller.model.api.stub
Last active June 22, 2022 07:02
Laravel Api Model Controller Stub comman controller action
<?php
namespace {{ namespace }};
use {{ namespacedModel }};
use {{ rootNamespace }}Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Validator;
@abdulbasit-dev
abdulbasit-dev / index.html
Created March 15, 2022 08:50
CSS to make footer stay at bottom of the page
<body>
<header contentEditable>Header</header>
<article contentEditable>Content</article>
<footer contentEditable>Footer</footer>
</body>
@abdulbasit-dev
abdulbasit-dev / pdocrash.php
Created December 7, 2020 21:29 — forked from bradtraversy/pdocrash.php
PDO & Prepared Statements Snippets
<?php
$host = 'localhost';
$user = 'root';
$password = '123456';
$dbname = 'pdoposts';
// Set DSN
$dsn = 'mysql:host='. $host .';dbname='. $dbname;
// Create a PDO instance