Category Archives: Programming

Checking Mime-Type of External URL Using PHP

I was overwhelmed by Mime-Type while I was working for a project. The problem is I don’t know how to retrieve the mime-type from a file, particularly file from another host. This url is the one I want t check its mime-type. Why do I have to check it? Because it doesn’t have proper extension […]

Laravel 5 belongsToMany() by Using Pivot Table Example

Relationship using pivot table in Laravel 5? A method, belongsToMany(), is a part of Eloquent ORM in Laravel 5. It connects between tables and it has many to many relationship. In order to use it, you must have two models three tables.

Blade Template Doesn’t Work in Laravel 5

No, that’s not true the Blade Template is still working in Laravel 5, but its tag directive has been changed. For some of you who don’t read the Laravel development change log may not know about this. The documentation said that “For better security by default, Laravel 5.0 escapes all output from both the {{ […]

How to Add Form Class in Laravel 5

Many of you will question about the error like HandleExceptions->fatalExceptionFromError( array(‘type’ => ‘1’, ‘message’ => ‘Class ‘Form’ not found’ or FatalErrorException in 193a332e9290704ad006bafdbd047286 line 2: Class ‘Form’ not found. Hmm, you must be just upgrading your Laravel 4 to Laravel 5 weren’t you? Laravel 5 doesn’t include the Form class like the previous version. It […]

How to Change public To public_html On Laravel 5 Ubuntu

Laravel 5 has different level from previous version. It becomes simpler and it has different file structure. That was making me confused at the first time when I was trying to migrate from previous version. The odd is bootstrap/paths.php doesn’t exist anymore. Now, how do I set the public folder of my project to desired […]

Returning Filename Only in PHP

How to strip file extension in PHP? I want to lose my filepath in my PHP string and then leave the filename without extension for the rest of it. I want to eliminate the darn extension! It’s very easy my friend. It’s basic, but it took me an hour to find the best solution. The […]

Handling 404 Errors NotFoundHttpException

First off, I want to thank to my grandfather, granma, mother, father, sister, brother, and whoever read this, especially Google who gave me only partial answer to my problem. So, here I create one of my complete solution to handle the 404 Errors on Laravel. Why my Laravel keeps showing the NotFoundHttpException error? Usually it […]

Can’t Install Laravel Via Laravel New

I’ve been thinking about why can’t I use laravel new [folder] to create a new Laravel installation. It seemed to be frustrating me like a dragon firing fireball into the castle. Stop that too much. Enough. So, the reason you landed on this page is because you got error message [GuzzleHttp\Exception\ClientException] Client error response [url] […]

Creating Array in Java

Creating Array in Java for the first time seems frustrating there are Map, HashMap, List, and ArrayList. Those are making us wonder which one to use. So, for the easy one I chose List as an object to create array. You have to create a java file named MyList.java first to make it works. Here […]

United States of America States and Cities List in Array PHP

We’ve created USA (United States of America) states and cities list in array for your programming purpose. The scripts are written in PHP. There are 46 states and 275 cities. You’ll get both newline and without newline arrays. The File is in zip format Total file size is 28.3Kb This is the sample of USA […]