03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Access Control List 56<br />

1 CREATE TABLE `resource` (<br />

2 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,<br />

3 `name` varchar(255) DEFAULT NULL,<br />

4 `pattern` varchar(255) DEFAULT NULL,<br />

5 `target` varchar(255) DEFAULT NULL,<br />

6 `secure` tinyint(1) DEFAULT NULL,<br />

7 `created_at` datetime DEFAULT NULL,<br />

8 `updated_at` datetime DEFAULT NULL,<br />

9 `deleted_at` datetime DEFAULT NULL,<br />

10 PRIMARY KEY (`id`)<br />

11 ) ENGINE=InnoDB CHARSET=utf8;<br />

The resource table has fields for the things we usually store in our routes file. The idea is that we<br />

keep the route information in the database so we can both programatically generate the routes for<br />

our application; and so that we can link various routes to groups for controlling access to various<br />

parts of our application.<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!