How To Create Facade On Laravel 5.2

Here is step by step to create facade on laravel 5.2

Create PHP Class File.

Bind that class to Service Provider

Register that ServiceProvider to Config\app.php as providers

Create Class which is this class extends to Illuminate\Support\Facades\Facade

Register point 4 to Config\app.php as aliases
Step 1 – Create PHP Class File, for example in App\Classes\Someclass.php

Step 2 – Bind that class to Service Provider

In case i create a new serviceprovider by execute

then add

Like so

Step 3 – Register that ServiceProvider to Config\app.php as providers

Step 4 – Create Class which is this class extends to Illuminate\Support\Facades\Facade

For Example I create this class in App\Facades\Someclass.php

Step 5 – Register point 4 to Config\app.php as aliases

Testing
On App\Http\routes.php create single route

Then check on your browser

Laravel 4: Easily Cache Eloquent Collections

An awesome feature that didn’t make it to the current documentation of Laravel 4, is caching within Eloquent models. So even caching the database results is done in just a single line of code, for example:

Sublime Text Personal Settings

Favorite Snippets

Close_windows_when_empty — Closes the whole window if there are only empty tabs open when you hit cmd + w.

 

Folder_exclude_patterns — Set up folder exclusion for commonly used directories in your projects.

Font_ — Set type preferences for readability. Obviously, a monospaced font like Source Code Pro from Adobe would be best.

Highlight_line — Highlights the currently selected line based on styles in your theme. Incredibly useful if you use multi-pane layouts.

Highlight_modified_tabs — Another theme-based preference, but still useful. If you have multiple tabs open, one with un-saved changes will be highlighted.

Match_ — On creation of an opening bracket/brace/etc, a closing one is inserted.

Scroll_ — Allows you to scroll past the end of a file, which is necessary, especially if you hate extra empty lines at the end of a file like I do. Scroll speed to 2 is also helpful if you’re impatient with large files.

Translate_tabs_to_spaces — Simple. Add this. And if you’re still using tabs in your code, quit it.

Complete Preferences:

 

Setting up Composer globally for Laravel 4

An easy way to set up composer globally is to follow the instructions on getcomposer.org site:

Now I can use composer by invoking just the composer command.

Optional way to do it, is to set up an alias:

and

Laravel PHP Framework Kurulumu

Şu sıralar uğraşmaktan zevk aldığım, hakkında yeni şeyler öğrenmek için yanıp tutuştuğum PHP Framework olan Laravel’i sizlere takdim edeyim. Bugün size Laravel‘in Windows üzerinde kurulumunu göstereceğim.

Öncelikle localhost olarak ben WAMP kullanıyorum sizlere de tavsiye ederim. Kurulumuda WAMP üzerinden anlatacağım için yüklemenizde fayda görüyorum.

WAMP’ı da yükledikten sonra Laravel’in son sürümünü sitesinden indiriyoruz.
Devamını Oku