Skip to content

Instantly share code, notes, and snippets.

😎
Coding like a boss

Ahmad Aziz densityx

😎
Coding like a boss
  • Kuala Lumpur
Block or report user

Report or block densityx

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
View plugin-file-and-camera.js
// window.resolveLocalFileURL(path, callback success, callback error)
// Tasks
/**
1. retrieve the app's folder. create if it doesn't exist
2. retrieve the image file
3. move image to app folder
*/
@densityx
densityx / event-service-provider.php
Created Dec 24, 2018
Listening global events and performing action for it
View event-service-provider.php
Event::listen(CommandStarting::class, function ($event) {
if ($event->command === 'migrate:fresh') {
Storage::deleteDirectory('/public/clubs');
Storage::deleteDirectory('/public/users');
}
});
@densityx
densityx / users-db-seeder.php
Created Dec 24, 2018
Dispatch job in laravel seeder after model creation
View users-db-seeder.php
factory(User::class, 10)->create()->each(function ($user) {
GenerateUserPoster::dispatch($user);
});
View help.txt
#User Model
===========
<?php
... class User
{
public function videos() {
return $this->belongsTo('Watch\Video');
You can’t perform that action at this time.