positonic

Software Engineering Consultant at Independent consultant

Hire Me

Experience

6,360

0 Best Reply Awards

  • Member Since 3 Years Ago
  • 96 Lessons Completed
  • 0 Favorites

16th April, 2018

positonic started a new conversation Allow For Payments To Team Owners • 1 week ago

Hi there, I have a requirement whereby I would like the people who create the team get paid by the people that join the team.

I'm guessing this isn't possible by default?

If that is not the case, has anyone done this before, and know if there's much involved? Or know of some code somewhere that does this?

In my mind it seems like it would just be a matter of storing the Stripe api keys for each team owner on the User record, and redirecting payment to that account instead of mine.

Other notes: I still charge the Team owners, and other individuals who sign up. I might want to get a % of what team members pay the team owner... though I guess this would necessitate a 2nd stripe transaction unless I somehow initiate a Stripe transfer from them or something...

Any help or advice will be gratefully appreciated!

14th September, 2017

positonic started a new conversation Nginx Config For Phpbb And Laravel • 7 months ago

I need an nginx config that will work for both Laravel and Phpbb.

I have used laravel forge to setup my digital ocean server, and it created this nginx config:

FORGE CONFIG (DOT NOT REMOVE!)

include forge-conf/djembefola.org/before/*;

server { listen 80; listen [::]:80; server_name djembefola.org; root /home/forge/djembefola.org/public;

# FORGE SSL (DO NOT REMOVE!)
# ssl_certificate;
# ssl_certificate_key;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:$
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/dhparams.pem;

add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

index index.html index.htm index.php;

charset utf-8;

# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/djembefola.org/server/*;

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt  { access_log off; log_not_found off; }

access_log off;
error_log  /var/log/nginx/djembefola.org-error.log error;

error_page 404 /index.php;

location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
}

location ~ /\.(?!well-known).* {
    deny all;
}

}

FORGE CONFIG (DOT NOT REMOVE!)

include forge-conf/djembefola.org/after/*;

###########################################

The /public folder is where the front controller index.php of Laravel lives...

Also in the public folder, I have and install of phpbb at - /public/board

I am upgrading the forum, and as such I need to rum the phpbb installer, which resides at:

localhost/board/install,

which then calls:

localhost/board/install/app.php/update

The above url is then giving a 404 error.

I have read elsewhere that this is because Nginx needs to be configured correctly in order to run the installer.

The sample Nginx config for phpbb is listed here.

So I need to merge these somehow, but so far my attempts have failed.

I tried adding :

location /board/ { rewrite ^(.*)$ /app.php/$1 last; }

to the existing laravel nginx file, but that fails. I am aware that I need to put it in the right place in the nginx config, but I fear I'm probably overlooking something else, as I am guessing a bit here...

Can anyone help please?

18th May, 2017

positonic left a reply on Connecting To A My Database On Forge • 11 months ago

Same issue here, did you find a solution?

14th May, 2017

positonic started a new conversation Security Fix In Laravel 5.4.22 • 11 months ago

I see there is a security fix on Laravel 5.4.22 - https://laravel.com/docs/5.4/releases#laravel-5.4.22

The wording: "Laravel 5.4.22 patches a security vulnerability in the Laravel 5.4 release series" - makes is sound like it only affects 5.4.x versions?

Should users of 5.2 also upgrade?

10th May, 2017

positonic left a reply on Homestead Not Working - Timing Out • 11 months ago

I'm not sure how to create a non-laravel site, but will look into that, and give it a go.

I don't find the logs at that location. You mean inside the Vagrant box?

9th May, 2017

positonic started a new conversation Homestead Not Working • 11 months ago

I have Homestead working on one laptop, and I'm transitioning to a new laptop. A razer blade stealth running ubuntu 17.04.

I have double checked all my configurations across both machines, and still I can't get it working on the new laptop. I can run vagrant up, as per the below command, and I can 'vagrant ssh' into the box and see the code is mirrored across.

but when I go to the url that should load up the virtual site in the browser, it just times out....

I thought it was an issue with my hosts file, but this is identical to my working version on Ubuntu 14.04: 127.0.0.1 localhost 192.168.10.10 ms.app

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters

[email protected]:~/Homestead$ vagrant up Bringing machine 'homestead-7' up with 'virtualbox' provider... ==> homestead-7: Clearing any previously set forwarded ports... ==> homestead-7: Clearing any previously set network interfaces... ==> homestead-7: Preparing network interfaces based on configuration... homestead-7: Adapter 1: nat homestead-7: Adapter 2: hostonly ==> homestead-7: Forwarding ports... homestead-7: 80 (guest) => 8000 (host) (adapter 1) homestead-7: 443 (guest) => 44300 (host) (adapter 1) homestead-7: 3306 (guest) => 33060 (host) (adapter 1) homestead-7: 5432 (guest) => 54320 (host) (adapter 1) homestead-7: 8025 (guest) => 8025 (host) (adapter 1) homestead-7: 27017 (guest) => 27017 (host) (adapter 1) homestead-7: 22 (guest) => 2222 (host) (adapter 1) ==> homestead-7: Running 'pre-boot' VM customizations... ==> homestead-7: Booting VM... ==> homestead-7: Waiting for machine to boot. This may take a few minutes... homestead-7: SSH address: 127.0.0.1:2222 homestead-7: SSH username: vagrant homestead-7: SSH auth method: private key ==> homestead-7: Machine booted and ready! ==> homestead-7: Checking for guest additions in VM... ==> homestead-7: Setting hostname... ==> homestead-7: Configuring and enabling network interfaces... ==> homestead-7: Mounting shared folders... homestead-7: /vagrant => /home/james/Homestead homestead-7: /home/vagrant/code => /home/james/code ==> homestead-7: Machine already provisioned. Run vagrant provision or use the --provision ==> homestead-7: flag to force provisioning. Provisioners marked to run always will still run.

Does anybody have any idea what could be causing this, and if not:

How can I go about debugging this issue?

16th March, 2017

positonic started a new conversation Options For Bug Tracker Integration With Laravel • 1 year ago

I have a requirement to have an integrated bugtracker within a Laravel project.

I can't seem to find any good Packages though.

Any suggestions on how to approach this?

17th January, 2017

positonic started a new conversation Form Validation - Array One Minimum 1 Field Required • 1 year ago

I have a form array like so:

I have validation rules like the below:

public function rules() { return [ 'intro.' => 'required', 'bio.' => 'required']; }

What I would actually need is that at least one of the intro s are filled in.

Is that possible with existing validators? If so what's the syntax? If not, how would I go about creating that validator?

21st November, 2016

positonic left a reply on Eager Loading Finds No Relations, When Lazy Does • 1 year ago

can you dd($items);

Then open up the relationship and screenshot it here...

30th March, 2016

positonic left a reply on DatabaseTransactions Gives SQL Timeout Error • 2 years ago

The problem is a database lock. These are 2 seperate tests that are locking each other. If I remove database transactions there is no lock.

positonic left a reply on DatabaseTransactions Gives SQL Timeout Error • 2 years ago

I have the same issue, did you resolve this?

23rd March, 2016

positonic left a reply on Pass Parameters In The Constructor Through A Service Provider • 2 years ago

ok thanks, how do I then get a new instance in my controller?

positonic started a new conversation Pass Parameters In The Constructor Through A Service Provider • 2 years ago

I have a class that is responseible for calling a 3rd party payment solution.

As a part of this, there are various merchant id/shared secret parameters. Theses will depend on who's logged into the application.

The class I'm working with takes this info in the constructor when the class is built. Is there a way to pass this in the service provider, perhaps like this:

 $this->app->bind(
        'App\BokaKanot\Interfaces\BillingInterface',function ($merchantId)
        {
            return new KlarnaBilling($merchantId);
        }

    );

If so, is it still possible to do this through a constructor or do I need to manaully use App:make. If I do have to use App::make, how can I not hide this inside my calling class?

Or should I refactor the class I'm using to not need this in the constructor, and perhaps have an init method?

20th November, 2015

positonic started a new conversation Wrong Class Resolved After Upgrade To 5.1 • 2 years ago

I just upgraded to Laravel 5.1.

As a part of this, I had to upgrade php on the server, and get around few pdo errors, and things like this.

Now I'm on another error and I suspect it might be something to do with the server too, but it's coming out as a code error....

In a controller, I was injecting a class: public function index(Request $request, Sidebar $sidebar, Encrypter $encrypter)

Since the upgrade I now get an error:

In a controller must be an instance of Illuminate\Encryption\Encrypter, instance of Illuminate\Encryption\McryptEncrypter given

Is it possible it's trying to auto-resolve Illuminate\Encryption\Encrypter, failing and then trying Illuminate\Encryption\McryptEncrypter? How do I track this down?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.