Skip to content

Instantly share code, notes, and snippets.

Avatar
📱
Learning and developing

Ahmed Helal AhmedHelalAhmed

📱
Learning and developing
View GitHub Profile
View LogAfterRequest.php
namespace App\Http\Middleware;
use Illuminate\Support\Facades\Log;
class LogAfterRequest {
public function handle($request, \Closure $next)
{
return $next($request);
}
@AhmedHelalAhmed
AhmedHelalAhmed / README.md
Last active Nov 1, 2021
log notification
View README.md
  • Make new file in /usr/local/bin with name log add its content from the file with name log
  • Add execution ability to it by: sudo chmod +x log
  • Add the song file with name new_log.mp3 in /usr/local/bin
  • Open terminal in for example laravel project(example-app): log /var/www/html/example-app/storage/logs/laravel.log
View websites for application.txt
codewars.com
hackerrank.com
topcoder.com
coderbyte.com
hackerearth.com
leetcode.com
codechef.com
edabit.com
codeforces.com
View Basic unit-of-work for Laravel
Simple contract or interface, call as you wish:
interface UnitOfWork
{
public function begin();
public function commit();
public function rollback();
}
View test_docker.txt
<?php
use App\Jobs\LogToFile;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
View .env
APP_NAME="log time status app"
APP_ENV=local
APP_KEY=base64:vwuZxLP3hiI4YbBHZ2pIKOrqdWfmcq3XNFdFqkM4lBs=
APP_DEBUG=true
APP_URL=http://testing.local
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=mysql
View gist:f26a59a8e3de55b9e9b3ce207f10e912
version: '3.5'
laravel-app:
build:
context: '.'
args:
uid: ${UID}
container_name: log-time-status-app
environment:
- APACHE_RUN_USER=#${UID}
- APACHE_RUN_GROUP=#${UID}
@AhmedHelalAhmed
AhmedHelalAhmed / axios.txt
Created Sep 26, 2021
Using Axios Instead Of "fetch()"
View axios.txt
import axios from 'axios'; // at the start of your <script> tag, before you "export default ..."
axios.post('https://vue-http-demo-85e9e.firebaseio.com/surveys.json', {
name: this.enteredName,
rating: this.chosenRating,
});
View DumpService.php
<?php
use App\Models\Customer;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
/**
* Class DumpService
* @author Ahmed Helal Ahmed
*/
View vuejs-the-complete-guide.txt
https://github.com/AhmedHelalAhmed/friends-app-vuejs
https://github.com/AhmedHelalAhmed/cmp-communication-assignment-problem
https://github.com/AhmedHelalAhmed/cmp-communication-08-a-potential-problem-starting-setup
https://github.com/AhmedHelalAhmed/badge-app
https://github.com/AhmedHelalAhmed/learning-resources-app
https://github.com/AhmedHelalAhmed/form-app
https://github.com/AhmedHelalAhmed/feedback-app
https://github.com/AhmedHelalAhmed/users-teams-app