bashy

DevOps/Lead Developer at a UK Company

Hire Me

Experience

1,042,330

488 Best Reply Awards

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

29th March, 2017

bashy left a reply on Register Middleware At All Routes In Package • 1 day ago

Have a look at the Kernel.php for middlewareGroups. Web should be on all routes, so you can add your middleware on there.

bashy left a reply on AWS EC2 Server Cpu Spike On PHP-FPM Process • 1 day ago

Have you got any code that could possibly be looping and taking memory?

You obviously can't keep raising the limits since it's just going to fill it.

28th March, 2017

bashy left a reply on Share My Adsense Revenue • 1 day ago

@fudetap I don't know enough to give you more info but I know it's not simple. I'd suggest going on the AdSense forum and asking some questions to get proper answers. They're helpful.

bashy left a reply on Restarting PHP-FPM In Deploy Script • 1 day ago

@skylerkatz A reload should suffice else you'll get downtime from a restart I think.

bashy left a reply on Restarting PHP-FPM In Deploy Script • 2 days ago

Forge supplies a button to activate opcache now?

bashy left a reply on Share My Adsense Revenue • 2 days ago

It will be based on an average. You get different amounts per country and if it was a conversion. You'll find you'd need to heavily manage a site like this and Google won't even give you that much per click or view. And to get 1000 clicks (legit), you'll need a lot of traffic.

bashy left a reply on Session ( [ $sessionKey => $sessionValue ] ); Does Not Work • 2 days ago

I'm guessing the session isn't saved from Android application so it's basically resetting each time.

I can't really help past that since you're not using a RESTful API. I have no clue what you're doing with session stuff either.

bashy left a reply on Session ( [ $sessionKey => $sessionValue ] ); Does Not Work • 2 days ago

Are you using the Postman cookie/session plugin to mirror them from your browser?

Normally the Laravel API won't have session included as well.

bashy left a reply on SSH Problems With Envoy Deploy • 2 days ago

Before you connect to ANY ssh server, you need to connect normally from the server you're connecting from.

Just have to add the host key into ~/.ssh/known_hosts so it protects you from MITM attacks.

22nd March, 2017

bashy left a reply on Reversible Data Encryption • 1 week ago

This uses Laravel's built-in encryption but has a nice way to manage it. Used it in a project, worked nicely.

https://github.com/delatbabel/elocryptfive

bashy left a reply on Beanstalkd • 1 week ago

@futurefuture Since you're using a queue worker, $_SERVER won't be available within the email view. You should pass that to the view as a separate variable before queuing.

bashy left a reply on Beanstalkd • 1 week ago

Yes, three backticks (`) at the start and end of the code

bashy left a reply on Beanstalkd • 1 week ago

Didn't get the output of that line. Did it get escaped?

bashy left a reply on Homebrew Mariadb Upgrade Mysql • 1 week ago

Latest MariaDB version is pretty much MySQL 5.5.5 (with some 5.6 stuff). Still waiting on JSON support which is in MariaDB Alpha I think.

bashy left a reply on Beanstalkd • 1 week ago

HTTP_HOST in a view? What do you have on line 341?

bashy left a reply on Cross-env Not Found On Npm Run Dev • 1 week ago

What does your package.json look like?

bashy left a reply on Envoyer.io Is Down ? • 1 week ago

Zero downtime because the system itself is down, so you can't deploy anyway!

Definitely some issues with it. Can't see my profile

Cough https://github.com/REBELinBLUE/deployer

bashy left a reply on Saving Twice To Database • 1 week ago

Adding onto what @ZetecVan stated;

Have a look in your browser's network tab in dev tools to see for if it's HTTP request that's duped or PHP code. If you see ONE request, it's PHP, else it's JS or the form itself.

Also, why do you return a view for a store method?

$content = Content::all();

return view('content::admin.index', compact('content'));

This should really be a redirect to index. That would show the new content (unless you have something special going on).

bashy left a reply on Npm Install Permission Error • 1 week ago

21st March, 2017

bashy left a reply on Uploading The Website On Shared Hosting. • 1 week ago

@Snapey And worse yet, because people installing it on 'shared hosting' don't use composer, they don't get the warning about the PHP version!

bashy left a reply on File Permissions And The Default Linux User • 1 week ago

  1. sudo chown -R youruser:www-data storage
  2. sudo chmod -R ug+rwx storage

That should good enough but yes, make sure you add your user to the www-data group so that new files are made like youruser:www-data.

bashy left a reply on Insert A Another Column's Value Into User's Properties On Create() • 1 week ago

OK, that seems fine.

Looks like the only thing it can be is the $fillable property on the User model. Since you're using ->create([array]) you need to add all the columns to it.

protected $fillable = [
    'name',
    'email',
    'password',
    'role',
    'role_id',
];

Ref: https://laravel.com/docs/5.4/eloquent#mass-assignment

bashy left a reply on Uploading The Website On Shared Hosting. • 1 week ago

Yeah ask them via whatever contact you have available.

You can move the folder you have inside public_html (but ask them first if they can do the other change).

bashy left a reply on How To Detect User Location And Redirect To Url In Laravel • 1 week ago

Are you using Cloudflare? You can use HTTP_CF_IPCOUNTRY header. https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-Cloudflare-IP-Geolocation-do

If not, you can do a similar thing with Geolocation data with MaxMind https://github.com/maxmind/geoip-api-php

bashy left a reply on Uploading The Website On Shared Hosting. • 1 week ago

Ask your host to make these changes;

  1. Move the website files up to the level with public_html
  2. Create a symlink from public_html -> new_folder

You can then use it as normal.

bashy left a reply on Insert A Another Column's Value Into User's Properties On Create() • 1 week ago

You will need to expand the 'attributes' array.

Is guests the Invite model then?

bashy left a reply on Insert A Another Column's Value Into User's Properties On Create() • 1 week ago

And if you dd($invite);, what do you get?

bashy left a reply on Laravel And Wordpress • 1 week ago

Is this something you could use for now? http://framework.themosis.com

bashy left a reply on .env Db_host Name? Laravel Php_network_getaddresses: Getaddrinfo Failed • 1 week ago

If PHP can't look up the DNS for the domain, it will fail. I would set the IP static in the /etc/hosts file on the server to save any DNS problems.

Just a Q: Do you host it on DigitalOcean? There was some DNS issues today.

bashy left a reply on Insert A Another Column's Value Into User's Properties On Create() • 1 week ago

Can you format the other code sections so I can read it?

20th March, 2017

bashy left a reply on Laravel And Semantic UI Integration • 1 week ago

@TheHamsterOfGod You not got a npm-debug.log file? How have you included it within your app.less file? Need more info.

bashy left a reply on Laravel CI Testing With GitLab • 1 week ago

@scuttlebyte This may help: https://github.com/WithSocial/docker-build If you look at the Dockerfile, it's pre-compiled like you wanted.

17th March, 2017

bashy left a reply on How Disable .env File • 1 week ago

@fabien44300 You can still use 'database' => env('DB_DATABASE', 'MyOwnDatabase'), but just remove .env file or comment out DB_DATABASE=?

bashy left a reply on How Disable .env File • 1 week ago

As @tomi stated, you can just ignore .env and use the configuration within config files. They just reference env() helper via .env file.

You don't even have to use .env as it comes directly from the PHP Environment. These can be set in the Apache VirtualHost or php-fpm pool.

15th March, 2017

bashy left a reply on Laravel Session Driver, File Or Database? • 2 weeks ago

@usamamashkoor Basic answer is: try it!.

14th March, 2017

bashy left a reply on Merge Collections • 2 weeks ago

@jaheller Did you do collect()->all()?

bashy left a reply on Laravel Subdomain And Nginx Subdomain Configuration Issues. • 2 weeks ago

@cyberomin Which is weird since you're only listening on two domains which are subs.

Have you checked raw PHP headers or just Laravel side ones?

13th March, 2017

bashy left a reply on Laravel Subdomain And Nginx Subdomain Configuration Issues. • 2 weeks ago

Have you spat out the domain that Laravel is receiving?

bashy left a reply on Laravel And Semantic UI Integration • 2 weeks ago

@TheHamsterOfGod Oh yeah, sorry. I meant less but same steps :) just call .less() instead of sass.

bashy left a reply on Laravel And Semantic UI Integration • 2 weeks ago

@TheHamsterOfGod Load it through package.json and include the sass within app.scss same as Gulp version

9th March, 2017

bashy left a reply on Allowed Memory Size Of 134217728 Bytes Exhausted • 3 weeks ago

Have you tried it?

It's probably something to do in mediaLibrary that causing it. Stuff should be cleared upon completion of one image.

bashy left a reply on Carbon Get Month & Day With Leading "0" • 3 weeks ago

dd($current_date->format('YmdH');?

$ artisan tinker
Psy Shell v0.8.2 (PHP 7.1.2 — cli) by Justin Hileman
>>>
>>> $now = Carbon\Carbon::now();
>>>
=> Carbon\Carbon {#811
     +"date": "2017-03-09 16:41:52.627977",
     +"timezone_type": 3,
     +"timezone": "Europe/London",
   }
>>>
>>> $now->format('YmdH');
>>>
=> "2017030916"
>>>

bashy left a reply on Table 'laravel.password_resets' Doesn't Exist • 3 weeks ago

php artisan migrate

Make sure to add in your correct database credentials into .env or similar.

8th March, 2017

bashy left a reply on What Happend To GetRelatedIds In Laravel 5.4 • 3 weeks ago

Probably need ->all() on that

return $this->tags->pluck('tag_id')->all();

7th March, 2017

bashy left a reply on 5.4.15 Broke My Heart ... App, I Mean App • 3 weeks ago

@topvillas Doesn't look like anything has changed in terms of method rename. I did find this though https://github.com/laravel/framework/pull/17965

I've upgraded to latest without problems.

6th March, 2017

bashy left a reply on Laravel Mix Is Breaking A Feature Test? • 3 weeks ago

I've not had to do anything but it could of changed in a release on laravel/laravel

bashy left a reply on Laravel Mix Is Breaking A Feature Test? • 3 weeks ago

Try cURLing the page?

bashy left a reply on Which Route Layout Is Better? • 3 weeks ago

Depends on the flow of your application but yeah, above comments are spot on.

3rd March, 2017

Edit Your Profile
Update

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