Looking for log files can be quite a hustle. Fortunately forge ( https://forge.laravel.com/ ) + papertrail ( https://papertrailapp.com/ )makes this a downright simple process. Assuming you already have an active forge and papertrail
Create a new logging system in papertrail
Take note of your specific link.
Hint: It is the content in large text logs2.papertrailapp.com:20***.
Login to your forge installation.
Select the server you want to manage and then navigate to the monitoring tab.
There is an option for papertrail. Paste in your link and click install.
Navigate back to papertrail and wait till your server shows up on the “All Systems” list.
And you are good to go. Happy logging!!
Among the list used keywords in php is “final”
The definition from http://php.net/manual/en/language.oop5.final.php.
PHP 5 introduces the final keyword, which prevents child classes from overriding a method by prefixing the definition with final. If the class itself is being defined final then it cannot be extended.
If you are anything like me, then your first thought must have been why would I want to kill inheritance and polymorphism. This does seem like a needless, neigh, a downright harmful operation. However this keyword plays a very important role in your application design.
One use case is where you would want to carry out the Introduce Parameter Object Refactor .
Our original class looks like this:
Once we have refactored:
So far all is well. Now imagine way into the future, you decide to make the date output a bit more user friendly, and being a good developer you extend the DateRange class with a new method
While all may look well. This bit of code will break all classes that used it as parameter!
When you really think about it, you realize that DateRange had no business being extended and should have been treated as a primitive object, just like the parameters it replaced.
As such this class should be declared final to protect it from further meddling and even more importantly to ensure consistency of your code.
If you don’t know about homestead, its a vagrant box that automatically configures a great development environment for laravel. http://laravel.com/docs/homestead
The box should always be suspended before shutting down your machine to prevent loss of data. This is not always possible and you may lose data. This may include data stored in database, new applications installed, custom configurations etc.
You will likely notice the loss of data when you try to run
on your box.
The steps detailed below are for Ubuntu 14.04, Virtualization provided by Oracle’s Virtual Box
Open terminal and run
VBoxManage list vms
This will give you a list of existing instances. That look something like this
It is very likely one of them is the box you lost. In my case it was the second last one.
Take note of the id (The value in the brackets)
Navigate to the base of your homestead box, ie that is where you normally start your box from.
From there you need to edit the id file ie
Replace the value in the id file with a value of one of the previous instances and save.
This steps helped me recover a lost instance.
All the best 🙂