Skip to content

Instantly share code, notes, and snippets.

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

otienoh Otienoh

🏠
Working from home
View GitHub Profile
@fhdalikhan
fhdalikhan / AuthServiceProvider.php
Created March 26, 2019 06:52 — forked from ralphschindler/AuthServiceProvider.php
Laravel 5.8 Policy Guesser For Using "Models" Directory
<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider
{
/**
@dillingham
dillingham / nova-bulk-permissions.md
Last active February 4, 2019 04:03
Bulk assign permissions to role

Bulk assign permissions to role

Bulk assign permissions to role

Make the following 2 actions

AttachRole

@simonhamp
simonhamp / AppServiceProvider.php
Last active March 26, 2024 15:56
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@hofmannsven
hofmannsven / README.md
Last active March 28, 2020 06:07
SQL analyzing business metrics
@rap2hpoutre
rap2hpoutre / laravel-forge-deploy.sh
Last active March 28, 2024 15:45
Laravel Forge deploy script without downtime
# stop script on error signal
set -e
# remove old deployment folders
if [ -d "/home/forge/deploy" ]; then
rm -R /home/forge/deploy
fi
if [ -d "/home/forge/backup" ]; then
rm -R /home/forge/backup
fi
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007