Skip to content

Instantly share code, notes, and snippets.

:octocat:
Focusing

Oussama Oussama-Tn

:octocat:
Focusing
Block or report user

Report or block Oussama-Tn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Oussama-Tn
Oussama-Tn / deploy.sh
Created May 6, 2019 — forked from BenSampo/deploy.sh
Laravel deploy script
View deploy.sh
# 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 Feb 6, 2019 — 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
View _ide_helper.php
<?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 Oct 13, 2018 — forked from davejamesmiller/Laravel-Container.md
Laravel's Dependency Injection Container in Depth
View Laravel-Container.md

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 Sep 7, 2018 — forked from brunogaspar/macro.md
Recursive Laravel Collection Macros
View macro.md

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

You can’t perform that action at this time.