Skip to content

Instantly share code, notes, and snippets.

View Oussama-Tn's full-sized avatar
:octocat:
Focusing

Oussama GHAIEB Oussama-Tn

:octocat:
Focusing
View GitHub Profile
@Oussama-Tn
Oussama-Tn / GitCommitEmoji.md
Created July 25, 2019 11:14 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@Oussama-Tn
Oussama-Tn / deploy.sh
Created May 6, 2019 11:04 — forked from BenSampo/deploy.sh
Laravel deploy script
# Change to the project directory
cd /home/forge/domain.com
# Turn on maintenance mode
php artisan down
# Pull the latest changes from the git repository
git pull origin master
# Install/update composer dependecies
@Oussama-Tn
Oussama-Tn / _ide_helper.php
Created February 6, 2019 13:42 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@Oussama-Tn
Oussama-Tn / Laravel-Container.md
Created October 13, 2018 20:56
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Translations: Korean (by Yongwoo Lee)

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).

@Oussama-Tn
Oussama-Tn / macro.md
Created September 7, 2018 15:09 — forked from brunogaspar/macro.md
Recursive Laravel Collection Macros

What?

If a nested array is passed into a Laravel Collection, by default these will be threaded as normal arrays.

However, that's not always the ideal case and it would be nice if we could have nested collections in a cleaner way.

This is where this macro comes in handy.

Setup