freekmurze

Developer at Spatie

Hire Me

Experience

32,700

7 Best Reply Awards

  • Member Since 3 Years Ago
  • 660 Lessons Completed
  • 8 Favorites

24th November, 2016

freekmurze left a reply on Error When Upgrading To Laravel 5.3 • 6 months ago

Did you remove the compiled file?

22nd November, 2016

freekmurze left a reply on Website Monitoring • 6 months ago

freekmurze left a reply on Monitor Site Availability • 6 months ago

Hi, I made a Laravel package the can monitor both uptime and ssl certificates. It can send out notifications to Slack (or any other notification provider you prefer) when something goes wrong.

Read all about it here: https://murze.be/2016/11/an-uptime-and-ssl-certificate-monitor-written-in-php/

26th June, 2016

freekmurze left a reply on Laravel 5.3 Wish List • 11 months ago

I'd like to have Adam's pipe macro as a regular function on the collection class. https://github.com/laravel/framework/pull/13899

freekmurze left a reply on Laravel 5.3 Wish List • 11 months ago

@xsmall I've made some packages that you might find useful:

All three packages have extensive docs, so you should have no problem using them. If you have a question about them, feel free to submit an issue at GitHub.

21st June, 2016

freekmurze left a reply on Laravel And Fractal • 11 months ago

I've written an easy to use package to integrate Fractal into Laravel/Lumen: https://github.com/spatie/laravel-fractal

9th June, 2016

freekmurze left a reply on Metrics Dashboard Using Vue And Laravel? • 11 months ago

Here's my take on implementing a dashboard with Laravel and Vue: https://murze.be/2016/06/building-dashboard-using-laravel-vue/

freekmurze left a reply on Uploading Files On S3 As Private File And Then Accessing The File • 11 months ago

The medialibrary package can upload files to S3 and generate URL's to them: https://docs.spatie.be/laravel-medialibrary/v4/introduction

freekmurze left a reply on Dashboards And Statistics • 11 months ago

I've recently created a dashboard that uses Larave, Vue, Pusher and graph.js. Read all about it here: https://murze.be/2016/06/building-dashboard-using-laravel-vue/

2nd March, 2016

freekmurze left a reply on Mailchimp SSL Certificate Problem • 1 year ago

@bashy thanks, will try that on the next droplet that is giving me troubles

1st March, 2016

freekmurze left a reply on ZipArchive Not Found In PHP 7 Forge Servers • 1 year ago

I think it's a very new problem. ZipArchive is only missing from server I've set up in the last couple of days.

To install it just run this command:

sudo apt-get install php7.0-zip

@bobbybouwmann and it's indeed necessary for the backup package :-) New major version will be released somewhere this week.

freekmurze started a new conversation ZipArchive Not Found In PHP 7 Forge Servers • 1 year ago

Newly provisioned Forge server do not seem to have ZipArchive installed.

new ZipArchive(); //results in class not found error.

Anybody have clear instruction on how to install this?

freekmurze left a reply on Mailchimp SSL Certificate Problem • 1 year ago

I encountered this problem as well. Just rebooting the droplet solved the problem. Pretty sure there must be a more elegant way of solving this.

4th February, 2016

freekmurze started a new conversation Always Backup Your Servers • 1 year ago

Yesterday one of my servers at DigitalOcean simply ceased to exists. If I had not made backups all the data of a client would be lost. Read the full story here: https://murze.be/2016/02/today-digitalocean-lost-our-entire-server.

If you are using one of those fancy cloud hosting providers like DigitalOcean, Linode or AWS as well make sure that you have backups of all your files and all your client files.

Forewarned is fore armed!

3rd February, 2016

freekmurze left a reply on Laravel 5 Route For Robots.txt • 1 year ago

My company made a package that solves this problem.

https://github.com/spatie/laravel-robots-middleware

Instead of you having to create a robots.txt this package will add a x-robots-tag to every request. You can extend the middleware to add custom logic that determines if the tag should be added and what the contents of the tag should be.

13th January, 2016

freekmurze left a reply on Laravel Full Page Caching • 1 year ago

Try to removing:

$response = $next($request);

and replacing

return $response;

by

return $next($request);

8th December, 2015

freekmurze started a new conversation How To Install The Imagick Extension For PHP7 • 1 year ago

Hi,

I provisioned a server with PHP 7 using Forge. I want to use imagick. What is the correct way to install the imagick php extension?

24th November, 2015

freekmurze left a reply on Obfuscate Download URLs? • 1 year ago

You might be interested to know that the medialibrary package gained support for custom directories

6th October, 2015

freekmurze started a new conversation Code Review: A Fractal Service Provider For Laravel • 1 year ago

Hi,

I put some work in an easy to use Fractal integration today. I'm welcoming all feedback before I tag version 1.0.0. tomorrow.

https://github.com/spatie/laravel-fractal

freekmurze left a reply on Fractal And Auth Server Tutorials • 1 year ago

If you're looking for an easy integration of Fractal with Laravel, I'm currently working on it

28th September, 2015

freekmurze left a reply on ACL Middleware • 1 year ago

I've created a middleware to check authorization on the route-level and released it as package. Take a look: https://github.com/spatie/laravel-authorize

24th September, 2015

freekmurze left a reply on Localization Series • 1 year ago

+1

11th September, 2015

freekmurze left a reply on HTTPS Health Check URL • 1 year ago

You've already figured it out while I was typing. Nice!! :-)

freekmurze left a reply on HTTPS Health Check URL • 1 year ago

Some browsers, like Chrome and Safari, fetch the certificate chain themselves if it is incomplete. Others, notably Firefox and a few mobile browsers do not. So if you're using Chrome you probably won't see the issue that users of other browsers (and command line tools) are having.

Normally Comodo should have sent you the intermediate certificates as well. You'll need to manually concatenate those after your domain specific certificate. It's a bit tedious error prone.

Alternatively you could just paste your domain specific certificate into https://certificatechain.io It will return your certificate concatenated with all intermediates. This is much easier than doing it manually.

If you've already installed a certificate for your domain Forge with tell you the file where the certificate is installed. It should look something like /etc/nginx/ssl/<your domain name>/<random number>/server.crt Just paste paste the whole chain (= specific certificate + intermediates) into that file and you're golden :-)

freekmurze left a reply on HTTPS Health Check URL • 1 year ago

Maybe there's something wrong with the certificate. Have you checked with a tool like https://www.ssllabs.com/ssltest/ if everything is ok?

Did you install the intermediate certificates as well? If not, you may find https://certificatechain.io/ helpful.

10th September, 2015

freekmurze left a reply on Anyone Know Of Any Issues With OS X El Capitan GM? • 1 year ago

I installed the GM this morning on both my MacBook pro (2015) and iMac (2011). Zero issues. Homestead / Vagrant is running fine. Npm just works. All apps are regulary use (phpstorm / sequel pro/ slack / iTerm 2) are just working

Your mileage may vary.

9th September, 2015

freekmurze left a reply on SFTP Upload • 1 year ago

You could create an sftp disk. Look in the Filesystem / Cloud storage documentation for more info.

7th September, 2015

freekmurze left a reply on Laracast - Bulk File Uploads - Syntax Question • 1 year ago

After years of PHP programming, until shortly, I didn't know that syntax. I wrote a little post about it on my blog. ES6 can now do this as well.

2nd September, 2015

freekmurze left a reply on Image Upload Using Storage Function To Public Folder • 1 year ago

I've made a package called medialibrary that fits your use case.

Once installed you can do this:

$yourModel->addMedia($yourUploadedFile)-> toMediaLibraryOnDisk('images','s3')
```php

Retrieving the url to a file that's stored in the library is easy as well:
```php
$yourModel->getFirstMediaUrl('images') //returns an url that points to your file on S3

The package uses streams to upload to S3, so upload big files aren't a problem. Of course there's support for using the local filesystem as well. The package also can create thumbnails of your images. The generation of such thumbnails can be queued.

Take a look at the documentation to learn what's possible.

6th August, 2015

freekmurze left a reply on Isolate Sites • 1 year ago

You could also opt to just provision two Forge servers. There's no better isolation than that. But of course you'll also double the hosting bill.

freekmurze left a reply on Require File • 1 year ago

If you want to require certain files explicitly on every request then you can use Composer's 'files' autoloading mechanism: https://getcomposer.org/doc/04-schema.md#files

freekmurze left a reply on Package Development • 1 year ago

This is a blog article on how Prosper Otemuyiwa starts developing packages (cached version, his site seems to be down atm)

And you can read on my blog how I do start working on package myself.

5th August, 2015

freekmurze left a reply on Upload Image • 1 year ago

I have made a package that does all the hard work for you. Once installed you can do this:

$post->addMedia($request->file('image'))->toCollection('images');

You can display the image in your blade view with:

<img src="{{ $news->getFirstMediaUrl('images') }}">

If you want a thumbnail of that image:

<img src="{{ $news->getFirstMediaUrl('images', 'thumb') }}">

The full documentation: https://github.com/spatie/laravel-medialibrary

4th August, 2015

freekmurze left a reply on [SUGGESTION] Handling Images In Tables? • 1 year ago

Take a look at my medialibrary package. It can associate images with Eloquent models and create images of different sizes: https://github.com/spatie/laravel-medialibrary

freekmurze left a reply on Image Handling And Display • 1 year ago

I made a package that just might fit your requirements: https://github.com/spatie/laravel-medialibrary Check it out!

29th July, 2015

freekmurze left a reply on Check If A Variable Exists • 1 year ago

you're probably looking for the isset function

26th July, 2015

freekmurze left a reply on Package For Managing Images • 1 year ago

Take a look at laravel-medialibrary. It can relate Eloquent models with files and generate derived versions of images/pdfs.

freekmurze left a reply on Laravel Project Backup • 1 year ago

If you want to backup both the database and user generated files, take a look at this package.

21st July, 2015

freekmurze left a reply on Backup Of Files Not Working With Package • 1 year ago

You have added the base_path() as an excluded directory. This result of this is that every file with get excluded.

freekmurze left a reply on [tip] A Neat Web-app For A Log Tail • 1 year ago

Very nice!

17th July, 2015

freekmurze left a reply on Advanced Optimizations • 1 year ago

I'm currently working on a package that can greatly improve the performance of any Laravel app. It can cache the entire response. Check the readme for details: https://github.com/spatie/laravel-responsecache ETA for version 1.0.0: somewhere next week.

19th May, 2015

17th May, 2015

freekmurze left a reply on Class Log Does Not Exist • 2 years ago

Found the error. I got a custom config file with this contents

return [
    'version' => '5.0.2',
    'installDate' => (new DateTime('20150514')),
];

When removing usage of the DateTime-class php artisan runs without problems on my mac. I'm glad I found the source of the problem but I'm puzzled why use DateTime is causing an error.

freekmurze left a reply on Class Log Does Not Exist • 2 years ago

I found out that this exception get thrown very early when starting the framework. I put an echo in Container.php to find out what is being resolved. On my mac php artisan returns

App\Console\Kernel
Illuminate\Foundation\Bootstrap\DetectEnvironment
Illuminate\Foundation\Bootstrap\LoadConfiguration
App\Exceptions\Handler
log
PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Class log does not exist' in /Users/freek/dev/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:778

On homestead everything works fine. These classes are displayed:

App\Console\Kernel
Illuminate\Foundation\Bootstrap\DetectEnvironment
Illuminate\Foundation\Bootstrap\LoadConfiguration
Illuminate\Foundation\Bootstrap\ConfigureLogging
Illuminate\Foundation\Bootstrap\HandleExceptions
Illuminate\Foundation\Bootstrap\RegisterFacades
Illuminate\Foundation\Bootstrap\SetRequestForConsole
Illuminate\Foundation\Bootstrap\RegisterProviders
Illuminate\Foundation\Bootstrap\BootProviders
DaveJamesMiller\Breadcrumbs\Manager
DaveJamesMiller\Breadcrumbs\CurrentRoute
DaveJamesMiller\Breadcrumbs\Generator
DaveJamesMiller\Breadcrumbs\View
Laracasts\Generators\Commands\SeedMakeCommand
Laracasts\Generators\Commands\MigrationMakeCommand
Illuminate\Foundation\Composer
Laracasts\Generators\Commands\PivotMigrationMakeCommand
Illuminate\Console\Scheduling\ScheduleRunCommand
App\Console\Commands\ScheduledBackupCommand
App\Services\ModuleGenerator\Command\GenerateModuleCommand
App\Console\Commands\DeleteOldDraftsCommand
App\Console\Commands\SlackCommand

I'm still puzzled by what causes the error on my mac.

16th May, 2015

freekmurze started a new conversation Class Log Does Not Exist • 2 years ago

When running php artisan on the command line of my mac it fails with this exception:

PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Class log does not exist' in /Users/freek/dev/digitalocean/blender5.spatie.be/vendor/laravel/framework/src/Illuminate/Container/Container.php:776
Stack trace:
#0 /Users/freek/dev/digitalocean/blender5.spatie.be/vendor/laravel/framework/src/Illuminate/Container/Container.php(776): ReflectionClass->__construct('log')
#1 /Users/freek/dev/digitalocean/blender5.spatie.be/vendor/laravel/framework/src/Illuminate/Container/Container.php(656): Illuminate\Container\Container->build('log', Array)
#2 /Users/freek/dev/digitalocean/blender5.spatie.be/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(644): Illuminate\Container\Container->make('log', Array)
#3 /Users/freek/dev/digitalocean/blender5.spatie.be/vendor/laravel/framework/src/Illuminate/Container/Container.php(887): Illuminate\Foundation\Application->make('Psr\\Log\\LoggerI...')
#4 /Users/freek/dev/digitalocean/blender5.spatie.be/vendor/laravel/framework/src/Illuminate/Container/Container.php( in /Users/freek/dev/digitalocean/blender5.spatie.be/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 776

Running php artisan in Homestead works just fine. Why could be the reason running that command fails on my mac?

Edit Your Profile
Update

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