Skip to content

Instantly share code, notes, and snippets.

@harrysbaraini
harrysbaraini / App\Http\Resources\EventResource.php
Created Jul 29, 2019
Laravel API Resources with permissions and links
View App\Http\Resources\EventResource.php
<?php
namespace App\Http\Resources;
use App\Http\Handlers\Admin\UploadMediaFile;
use App\Http\Resources\Support\ResourceLink;
use App\Policies\EventPolicy;
use Illuminate\Support\Facades\Auth;
class EventResource extends ItemResource
@setola
setola / wp-config.php
Last active Jun 27, 2016
WordPress - Enable custom repository from local ip
View wp-config.php
<?php
/** Enable my local themes and plugins repository FFS!!! */
add_filter( 'http_request_host_is_external', 'allow_my_custom_host', 10, 3 );
function allow_my_custom_host( $allow, $host, $url ) {
if ( $host == 'put.your-repository-domain-here.com' )
$allow = true;
return $allow;
}
You can’t perform that action at this time.