Skip to content

Instantly share code, notes, and snippets.

View qadirpervez's full-sized avatar
🏠
Working from home

Qadir Pervez qadirpervez

🏠
Working from home
View GitHub Profile
@qadirpervez
qadirpervez / Array.vue
Created May 28, 2022 09:44
ObjectKey Map
<template>
<div class="widget">
<div v-if="activeItems && activeItems.length > 0">
<ul>
<li v-for="item in activeItems" :key="item.id">
{{item.name}}
</li>
</ul>
</div>
</div>
<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Support\Facades\Mail;
use App\Mail\WelcomeNewCustomer;
class CustomerStoreTest extends TestCase
{
@qadirpervez
qadirpervez / CustomerController.php
Created May 28, 2022 08:35
Refactoring Controller
<?php
namespace App\Http\Controllers;
use App\Http\Requests\CustomerStoreRequest;
use App\Services\CustomerService;
class CustomerController extends Controller
{
@qadirpervez
qadirpervez / final_AppInstaller.php
Last active July 13, 2022 13:44
Final App Installer Command
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB;
@qadirpervez
qadirpervez / initial_AppInstaller.php
Last active March 17, 2022 21:01
Install Command In Laravel
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class AppInstaller extends Command
{
/**
* The name and signature of the console command.
@qadirpervez
qadirpervez / changephp.sh
Last active July 21, 2023 09:14
change php version in cli and for apache
## Switch php version php-cli and in apache
echo
echo -e "\033[1;31m PHP Version changer Switcher\e[0m"
echo
echo -e "\033[0;33m PHP version currently active in your '/cli': \033[0;35m`sudo php -v | head -n 1 | cut -c 1-10` \e[0m" # Checking running php version
sudo sudo service apache2 stop &>- # Stopping lampp stack if running
echo
echo -e "\033[0;31m versions that you have installed:\e[0m"
ls -ldt /etc/php/* | awk '{print $9}'
echo