Laravel 5: Auto loading for new class (mapping) has been removed from laravel 5.0

I mean to record this in the past but kind a forget about it.

What happen is while upgrading my laravel system from 5.0 to another version above. I find it lost automated function to adding new module/class into the class_map.

As naive as I was, I thought it was a great feature at that time to save me not to run the “composer dump-autoload” command to import new classed into the library. Because at that time in some server I wasn’t allow to have the Shell Access and hence no idea how to run the dump-autoload command. (Can still deploy it with FTP access from online application I was using – deploybot at that time).

Then it hit me when I do a quick update on the framework. Which whenever I deploy the new code it will throw Class not found exception in Laravel.

Continue reading “Laravel 5: Auto loading for new class (mapping) has been removed from laravel 5.0”

Laravel 5: How to stay on the same page after login?

I have been google it and find a few ways to do it. But I think the method below is the quicker way.

You can modify your route in routes.php like this:

Route::get( 'page-slub'
'middleware' => 'auth',   // so it will required authentication
'uses' => 'yourPageControllerClass@handler'

That’s it. All you need is the add the “middleware” authentication into your Route. Then it should redirect you back to the previous page after the login.

Hope this help.

Laravel 5: Get the HTML Output from a View Object

Normal we can use view object to generate the layout and html content. But in here what happen if we want to use the View object to help generate the html out as a string that we can pass around with in the code?

In Laravel 5, we could  use view($template_name, [“keyname” => $arg, …..]) ->render();  to get the HTML string. However the story is not going to end here…

Now you have a string with all the HTML tags and attributes, but if you use {{ display }}, it won’t work.

  • Because {{ …. }} escape HTML by default, to prevent HTML injection.

Hence, you will need to use {!! … !!} to print the raw HTML.

Clear or Prevent Caching on a Page

Sometime we might want to disable the caching for development or unwanted cache effect on the live site. Although cache is useful and help improve performance, but this doesn’t mean it is always a good things.

There is time, mostly during development when I constantly need update and make code changes for testing and debugging, caching can be ignoring and confusing for the outcome. In this case you want want to use the following meta tags to stop caching on your pages.


For more information please referring to this following link.
Useful HTML Meta Tags

Portfolio: Danakali Limited

A mobildanakalie responsive website on Joomla CMS platform. All contents has been organised so a specific user login (not the super admin access)  will be able to change content directly. This website is a full custom website without using any existing template. I get the design from the designer on PDS format and develop it from the design. Here is a short list of feature for this website:

Continue reading “Portfolio: Danakali Limited”

WordPress Visual not working (Fix)

While working on one of my client WordPress site, I come across a issue which after some updates, the Visual Editor is no long working.

I search for the solution on in the forum and here is the fix for my issue.

define( ‘CONCATENATE_SCRIPTS’, false );

This seems to be an issue with the tinymce js files and it keep throwing some error whenever I click on the Visual tab.

For more information you can read through the thread here .

Portfolio: Oracle Insurance Brokers

Thoracleis is a full custom website, using YooTheme – YooMaster2 base template. I am one of the two developers assigned to this project. My main focus was to working the responsive styling and implement the specific mobile design from our graphic design team.

This is a WordPress site with content area specific for client to update and modify.

Please click the link below to visit the website.

Oracle Group Insurance Brokers