carbincreative/postmark

Minor improvements to Laravel 4.x Router class.

dev-master 2013-12-14 11:20 UTC

This package is not auto-updated.

Last update: 2024-09-24 01:41:05 UTC


README

Minor improvements to Laravel 4.x Router class. Adds support for Route::alias and Route::redirect.

Installation

Add this repository to your composer.json.

"reposotories": [
	{
		"type": "git",
		"url": "https://github.com/CarbinCreative/Postmark.git"
	}
]

And don't forget about your require, also in composer.json.

"require": [
	"carbincreative/postmark": "dev-master"
]

As a final step you'll need to add our ServiceProvider to app/config/app.php.

'Postmark\PostmarkServiceProvider'

Usage

Just add a route as you normally would, like so…

Route::get('hello-world', 'FooController@get');
Route::get('company/jobs', 'BarController@get');

Now it's super simple to add either an alias, or redirect.

Route::alias('hejsan-varlden', 'hello-world');
Route::redirect('work-with-us', 'company/jobs');