├── .gitattributes ├── .gitignore ├── CONTRIBUTING.md ├── README.md ├── app ├── commands │ └── .gitkeep ├── config │ ├── app.php │ ├── auth.php │ ├── cache.php │ ├── compile.php │ ├── database.php │ ├── mail.php │ ├── packages │ │ └── .gitkeep │ ├── queue.php │ ├── remote.php │ ├── session.php │ ├── testing │ │ ├── cache.php │ │ └── session.php │ ├── view.php │ └── workbench.php ├── controllers │ ├── .gitkeep │ ├── AuthorController.php │ ├── BaseController.php │ ├── CategoryController.php │ ├── HomeController.php │ ├── PostController.php │ └── TagController.php ├── database │ ├── migrations │ │ ├── .gitkeep │ │ ├── 2014_01_15_200854_create_posts.php │ │ ├── 2014_01_15_202655_create_texts.php │ │ ├── 2014_01_15_203905_create_tags.php │ │ ├── 2014_01_15_204400_create_users.php │ │ ├── 2014_01_15_205010_create_images.php │ │ ├── 2014_01_22_193621_create_categories.php │ │ └── 2014_01_22_202355_create_comments.php │ ├── production.sqlite │ └── seeds │ │ ├── .gitkeep │ │ ├── CategorySeeder.php │ │ ├── CommentSeeder.php │ │ ├── DatabaseSeeder.php │ │ ├── ImageSeeder.php │ │ ├── PostSeeder.php │ │ ├── TagSeeder.php │ │ ├── TextSeeder.php │ │ └── UserSeeder.php ├── filters.php ├── lang │ └── en │ │ ├── pagination.php │ │ ├── reminders.php │ │ └── validation.php ├── models │ ├── Category.php │ ├── Comment.php │ ├── Image.php │ ├── Post.php │ ├── Tag.php │ ├── Text.php │ └── User.php ├── routes.php ├── start │ ├── artisan.php │ ├── global.php │ └── local.php ├── storage │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── logs │ │ └── .gitignore │ ├── meta │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ └── views │ │ └── .gitignore ├── tests │ ├── ExampleTest.php │ └── TestCase.php └── views │ ├── author │ └── show.blade.php │ ├── category │ └── show.blade.php │ ├── emails │ └── auth │ │ └── reminder.blade.php │ ├── home.blade.php │ ├── layouts │ └── master.blade.php │ ├── post │ ├── create.blade.php │ └── show.blade.php │ └── tag │ └── show.blade.php ├── artisan ├── bootstrap ├── autoload.php ├── paths.php └── start.php ├── composer.json ├── composer.lock ├── phpunit.xml ├── public ├── .htaccess ├── css │ └── styles.css ├── favicon.ico ├── images │ └── code.png ├── index.php ├── packages │ └── .gitkeep └── robots.txt ├── server.php └── upgrade.md /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /bootstrap/compiled.php 2 | /vendor 3 | composer.phar 4 | .DS_Store 5 | Thumbs.db 6 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | Please submit all issues and pull requests to the [laravel/framework](http://github.com/laravel/framework) repository! -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Eloquent Model Relationship Demo 2 | ============================================== 3 | 4 | This project is a companion to this article: http://codeplanet.io/laravel-model-relationships-pt-1/ 5 | 6 | This Laravel project is meant to illustrate the various Eloquent model relationships available in Laravel 4.1, including; 7 | 8 | * One-To-One 9 | * One-To-Many 10 | * Many-To-Many 11 | * Polymorphic Relations 12 | * Has-Many-Through 13 | 14 | http://laravel.com/docs/eloquent#relationships 15 | 16 | Setup 17 | ----- 18 | 19 | 1. Clone the repo 20 | 2. Install Composer packages (`composer install`) 21 | 3. Create a database 22 | 4. Update the DB connection config (i.e. host, database, username, password) in /app/config/database.php 23 | 5. Run migrations (`php artisan migrate`) 24 | 6. Run DB seeders (`php artisan db:seed`) 25 | 26 | 27 | ### Schema 28 | ``` 29 | users 30 | - id 31 | - name 32 | 33 | posts 34 | - id 35 | - title 36 | - author_id (aliased user.id) 37 | 38 | tags 39 | - id 40 | - name 41 | 42 | post_tag (pivot table) 43 | - post_id 44 | - tag_id 45 | 46 | texts 47 | - id 48 | - post_id 49 | - text 50 | 51 | images 52 | - id 53 | - url 54 | - imageable_id 55 | - imageable_type 56 | ``` 57 | 58 | ### One-To-One 59 | A one-to-one relationship is not the most common type of relationship, hence the example in the context of this blog site demo is very contrived. 60 | 61 | The Post table/model only has a title, and the body text of each post lives in a separate table/model called Text; each post has one text. 62 | 63 | ### One-To-Many 64 | Probably the most common relationship. In this example, there is a one-to-many relationship between authors/users and posts; each author can have many posts. 65 | 66 | ### Many-To-Many 67 | A post can have many tags attached, and each tag can have many posts. 68 | 69 | ### Polymorphic...To-Many 70 | The Image model can morph to be used as a user/author photo, or a primary post image. 71 | 72 | ### Has-Many-Through 73 | By defining a Has-Many-Through relationship, one model can leap frog to an indirectly related (a/k/a no foreign key) model through a common model. 74 | 75 | In this example, you could fetch all tags attached to posts attributed to a given author. An __author__ *has many* __tags__ *through* __posts__. 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /app/commands/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtrenz/laravel-model-demo/ce0347b9abb046e9b9dea3646f70970136379078/app/commands/.gitkeep -------------------------------------------------------------------------------- /app/config/app.php: -------------------------------------------------------------------------------- 1 | true, 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application URL 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This URL is used by the console to properly generate URLs when using 24 | | the Artisan command line tool. You should set this to the root of 25 | | your application so that it is used when running Artisan tasks. 26 | | 27 | */ 28 | 29 | 'url' => 'http://localhost', 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Timezone 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may specify the default timezone for your application, which 37 | | will be used by the PHP date and date-time functions. We have gone 38 | | ahead and set this to a sensible default for you out of the box. 39 | | 40 | */ 41 | 42 | 'timezone' => 'UTC', 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application Locale Configuration 47 | |-------------------------------------------------------------------------- 48 | | 49 | | The application locale determines the default locale that will be used 50 | | by the translation service provider. You are free to set this value 51 | | to any of the locales which will be supported by the application. 52 | | 53 | */ 54 | 55 | 'locale' => 'en', 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Encryption Key 60 | |-------------------------------------------------------------------------- 61 | | 62 | | This key is used by the Illuminate encrypter service and should be set 63 | | to a random, 32 character string, otherwise these encrypted strings 64 | | will not be safe. Please do this before deploying an application! 65 | | 66 | */ 67 | 68 | 'key' => 'zGKvEOixmIU0Ot5thKXvaYbpEFYDtSMP', 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Autoloaded Service Providers 73 | |-------------------------------------------------------------------------- 74 | | 75 | | The service providers listed here will be automatically loaded on the 76 | | request to your application. Feel free to add your own services to 77 | | this array to grant expanded functionality to your applications. 78 | | 79 | */ 80 | 81 | 'providers' => array( 82 | 83 | 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 84 | 'Illuminate\Auth\AuthServiceProvider', 85 | 'Illuminate\Cache\CacheServiceProvider', 86 | 'Illuminate\Session\CommandsServiceProvider', 87 | 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', 88 | 'Illuminate\Routing\ControllerServiceProvider', 89 | 'Illuminate\Cookie\CookieServiceProvider', 90 | 'Illuminate\Database\DatabaseServiceProvider', 91 | 'Illuminate\Encryption\EncryptionServiceProvider', 92 | 'Illuminate\Filesystem\FilesystemServiceProvider', 93 | 'Illuminate\Hashing\HashServiceProvider', 94 | 'Illuminate\Html\HtmlServiceProvider', 95 | 'Illuminate\Log\LogServiceProvider', 96 | 'Illuminate\Mail\MailServiceProvider', 97 | 'Illuminate\Database\MigrationServiceProvider', 98 | 'Illuminate\Pagination\PaginationServiceProvider', 99 | 'Illuminate\Queue\QueueServiceProvider', 100 | 'Illuminate\Redis\RedisServiceProvider', 101 | 'Illuminate\Remote\RemoteServiceProvider', 102 | 'Illuminate\Auth\Reminders\ReminderServiceProvider', 103 | 'Illuminate\Database\SeedServiceProvider', 104 | 'Illuminate\Session\SessionServiceProvider', 105 | 'Illuminate\Translation\TranslationServiceProvider', 106 | 'Illuminate\Validation\ValidationServiceProvider', 107 | 'Illuminate\View\ViewServiceProvider', 108 | 'Illuminate\Workbench\WorkbenchServiceProvider', 109 | 110 | ), 111 | 112 | /* 113 | |-------------------------------------------------------------------------- 114 | | Service Provider Manifest 115 | |-------------------------------------------------------------------------- 116 | | 117 | | The service provider manifest is used by Laravel to lazy load service 118 | | providers which are not needed for each request, as well to keep a 119 | | list of all of the services. Here, you may set its storage spot. 120 | | 121 | */ 122 | 123 | 'manifest' => storage_path().'/meta', 124 | 125 | /* 126 | |-------------------------------------------------------------------------- 127 | | Class Aliases 128 | |-------------------------------------------------------------------------- 129 | | 130 | | This array of class aliases will be registered when this application 131 | | is started. However, feel free to register as many as you wish as 132 | | the aliases are "lazy" loaded so they don't hinder performance. 133 | | 134 | */ 135 | 136 | 'aliases' => array( 137 | 138 | 'App' => 'Illuminate\Support\Facades\App', 139 | 'Artisan' => 'Illuminate\Support\Facades\Artisan', 140 | 'Auth' => 'Illuminate\Support\Facades\Auth', 141 | 'Blade' => 'Illuminate\Support\Facades\Blade', 142 | 'Cache' => 'Illuminate\Support\Facades\Cache', 143 | 'ClassLoader' => 'Illuminate\Support\ClassLoader', 144 | 'Config' => 'Illuminate\Support\Facades\Config', 145 | 'Controller' => 'Illuminate\Routing\Controller', 146 | 'Cookie' => 'Illuminate\Support\Facades\Cookie', 147 | 'Crypt' => 'Illuminate\Support\Facades\Crypt', 148 | 'DB' => 'Illuminate\Support\Facades\DB', 149 | 'Eloquent' => 'Illuminate\Database\Eloquent\Model', 150 | 'Event' => 'Illuminate\Support\Facades\Event', 151 | 'File' => 'Illuminate\Support\Facades\File', 152 | 'Form' => 'Illuminate\Support\Facades\Form', 153 | 'Hash' => 'Illuminate\Support\Facades\Hash', 154 | 'HTML' => 'Illuminate\Support\Facades\HTML', 155 | 'Input' => 'Illuminate\Support\Facades\Input', 156 | 'Lang' => 'Illuminate\Support\Facades\Lang', 157 | 'Log' => 'Illuminate\Support\Facades\Log', 158 | 'Mail' => 'Illuminate\Support\Facades\Mail', 159 | 'Paginator' => 'Illuminate\Support\Facades\Paginator', 160 | 'Password' => 'Illuminate\Support\Facades\Password', 161 | 'Queue' => 'Illuminate\Support\Facades\Queue', 162 | 'Redirect' => 'Illuminate\Support\Facades\Redirect', 163 | 'Redis' => 'Illuminate\Support\Facades\Redis', 164 | 'Request' => 'Illuminate\Support\Facades\Request', 165 | 'Response' => 'Illuminate\Support\Facades\Response', 166 | 'Route' => 'Illuminate\Support\Facades\Route', 167 | 'Schema' => 'Illuminate\Support\Facades\Schema', 168 | 'Seeder' => 'Illuminate\Database\Seeder', 169 | 'Session' => 'Illuminate\Support\Facades\Session', 170 | 'SSH' => 'Illuminate\Support\Facades\SSH', 171 | 'Str' => 'Illuminate\Support\Str', 172 | 'URL' => 'Illuminate\Support\Facades\URL', 173 | 'Validator' => 'Illuminate\Support\Facades\Validator', 174 | 'View' => 'Illuminate\Support\Facades\View', 175 | 176 | ), 177 | 178 | ); 179 | -------------------------------------------------------------------------------- /app/config/auth.php: -------------------------------------------------------------------------------- 1 | 'eloquent', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Authentication Model 23 | |-------------------------------------------------------------------------- 24 | | 25 | | When using the "Eloquent" authentication driver, we need to know which 26 | | Eloquent model should be used to retrieve your users. Of course, it 27 | | is often just the "User" model but you may use whatever you like. 28 | | 29 | */ 30 | 31 | 'model' => 'User', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Authentication Table 36 | |-------------------------------------------------------------------------- 37 | | 38 | | When using the "Database" authentication driver, we need to know which 39 | | table should be used to retrieve your users. We have chosen a basic 40 | | default value but you may easily change it to any table you like. 41 | | 42 | */ 43 | 44 | 'table' => 'users', 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Password Reminder Settings 49 | |-------------------------------------------------------------------------- 50 | | 51 | | Here you may set the settings for password reminders, including a view 52 | | that should be used as your password reminder e-mail. You will also 53 | | be able to set the name of the table that holds the reset tokens. 54 | | 55 | | The "expire" time is the number of minutes that the reminder should be 56 | | considered valid. This security feature keeps tokens short-lived so 57 | | they have less time to be guessed. You may change this as needed. 58 | | 59 | */ 60 | 61 | 'reminder' => array( 62 | 63 | 'email' => 'emails.auth.reminder', 64 | 65 | 'table' => 'password_reminders', 66 | 67 | 'expire' => 60, 68 | 69 | ), 70 | 71 | ); 72 | -------------------------------------------------------------------------------- /app/config/cache.php: -------------------------------------------------------------------------------- 1 | 'file', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | File Cache Location 23 | |-------------------------------------------------------------------------- 24 | | 25 | | When using the "file" cache driver, we need a location where the cache 26 | | files may be stored. A sensible default has been specified, but you 27 | | are free to change it to any other place on disk that you desire. 28 | | 29 | */ 30 | 31 | 'path' => storage_path().'/cache', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Database Cache Connection 36 | |-------------------------------------------------------------------------- 37 | | 38 | | When using the "database" cache driver you may specify the connection 39 | | that should be used to store the cached items. When this option is 40 | | null the default database connection will be utilized for cache. 41 | | 42 | */ 43 | 44 | 'connection' => null, 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Database Cache Table 49 | |-------------------------------------------------------------------------- 50 | | 51 | | When using the "database" cache driver we need to know the table that 52 | | should be used to store the cached items. A default table name has 53 | | been provided but you're free to change it however you deem fit. 54 | | 55 | */ 56 | 57 | 'table' => 'cache', 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | Memcached Servers 62 | |-------------------------------------------------------------------------- 63 | | 64 | | Now you may specify an array of your Memcached servers that should be 65 | | used when utilizing the Memcached cache driver. All of the servers 66 | | should contain a value for "host", "port", and "weight" options. 67 | | 68 | */ 69 | 70 | 'memcached' => array( 71 | 72 | array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100), 73 | 74 | ), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Cache Key Prefix 79 | |-------------------------------------------------------------------------- 80 | | 81 | | When utilizing a RAM based store such as APC or Memcached, there might 82 | | be other applications utilizing the same cache. So, we'll specify a 83 | | value to get prefixed to all our keys so we can avoid collisions. 84 | | 85 | */ 86 | 87 | 'prefix' => 'laravel', 88 | 89 | ); 90 | -------------------------------------------------------------------------------- /app/config/compile.php: -------------------------------------------------------------------------------- 1 | PDO::FETCH_CLASS, 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Database Connection Name 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may specify which of the database connections below you wish 24 | | to use as your default connection for all database work. Of course 25 | | you may use many connections at once using the Database library. 26 | | 27 | */ 28 | 29 | 'default' => 'mysql', 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Database Connections 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here are each of the database connections setup for your application. 37 | | Of course, examples of configuring each database platform that is 38 | | supported by Laravel is shown below to make development simple. 39 | | 40 | | 41 | | All database work in Laravel is done through the PHP PDO facilities 42 | | so make sure you have the driver for your particular database of 43 | | choice installed on your machine before you begin development. 44 | | 45 | */ 46 | 47 | 'connections' => array( 48 | 49 | 'mysql' => array( 50 | 'driver' => 'mysql', 51 | 'host' => 'localhost', 52 | 'database' => 'model_demo', 53 | 'username' => 'root', 54 | 'password' => 'root', 55 | 'charset' => 'utf8', 56 | 'collation' => 'utf8_unicode_ci', 57 | 'prefix' => '', 58 | ), 59 | 60 | ), 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Migration Repository Table 65 | |-------------------------------------------------------------------------- 66 | | 67 | | This table keeps track of all the migrations that have already run for 68 | | your application. Using this information, we can determine which of 69 | | the migrations on disk haven't actually been run in the database. 70 | | 71 | */ 72 | 73 | 'migrations' => 'migrations', 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Redis Databases 78 | |-------------------------------------------------------------------------- 79 | | 80 | | Redis is an open source, fast, and advanced key-value store that also 81 | | provides a richer set of commands than a typical key-value systems 82 | | such as APC or Memcached. Laravel makes it easy to dig right in. 83 | | 84 | */ 85 | 86 | 'redis' => array( 87 | 88 | 'cluster' => false, 89 | 90 | 'default' => array( 91 | 'host' => '127.0.0.1', 92 | 'port' => 6379, 93 | 'database' => 0, 94 | ), 95 | 96 | ), 97 | 98 | ); 99 | -------------------------------------------------------------------------------- /app/config/mail.php: -------------------------------------------------------------------------------- 1 | 'smtp', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | SMTP Host Address 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may provide the host address of the SMTP server used by your 26 | | applications. A default option is provided that is compatible with 27 | | the Postmark mail service, which will provide reliable delivery. 28 | | 29 | */ 30 | 31 | 'host' => 'smtp.mailgun.org', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | SMTP Host Port 36 | |-------------------------------------------------------------------------- 37 | | 38 | | This is the SMTP port used by your application to delivery e-mails to 39 | | users of your application. Like the host we have set this value to 40 | | stay compatible with the Postmark e-mail application by default. 41 | | 42 | */ 43 | 44 | 'port' => 587, 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Global "From" Address 49 | |-------------------------------------------------------------------------- 50 | | 51 | | You may wish for all e-mails sent by your application to be sent from 52 | | the same address. Here, you may specify a name and address that is 53 | | used globally for all e-mails that are sent by your application. 54 | | 55 | */ 56 | 57 | 'from' => array('address' => null, 'name' => null), 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | E-Mail Encryption Protocol 62 | |-------------------------------------------------------------------------- 63 | | 64 | | Here you may specify the encryption protocol that should be used when 65 | | the application send e-mail messages. A sensible default using the 66 | | transport layer security protocol should provide great security. 67 | | 68 | */ 69 | 70 | 'encryption' => 'tls', 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | SMTP Server Username 75 | |-------------------------------------------------------------------------- 76 | | 77 | | If your SMTP server requires a username for authentication, you should 78 | | set it here. This will get used to authenticate with your server on 79 | | connection. You may also set the "password" value below this one. 80 | | 81 | */ 82 | 83 | 'username' => null, 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | SMTP Server Password 88 | |-------------------------------------------------------------------------- 89 | | 90 | | Here you may set the password required by your SMTP server to send out 91 | | messages from your application. This will be given to the server on 92 | | connection so that the application will be able to send messages. 93 | | 94 | */ 95 | 96 | 'password' => null, 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Sendmail System Path 101 | |-------------------------------------------------------------------------- 102 | | 103 | | When using the "sendmail" driver to send e-mails, we will need to know 104 | | the path to where Sendmail lives on this server. A default path has 105 | | been provided here, which will work well on most of your systems. 106 | | 107 | */ 108 | 109 | 'sendmail' => '/usr/sbin/sendmail -bs', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Mail "Pretend" 114 | |-------------------------------------------------------------------------- 115 | | 116 | | When this option is enabled, e-mail will not actually be sent over the 117 | | web and will instead be written to your application's logs files so 118 | | you may inspect the message. This is great for local development. 119 | | 120 | */ 121 | 122 | 'pretend' => false, 123 | 124 | ); -------------------------------------------------------------------------------- /app/config/packages/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtrenz/laravel-model-demo/ce0347b9abb046e9b9dea3646f70970136379078/app/config/packages/.gitkeep -------------------------------------------------------------------------------- /app/config/queue.php: -------------------------------------------------------------------------------- 1 | 'sync', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => array( 32 | 33 | 'sync' => array( 34 | 'driver' => 'sync', 35 | ), 36 | 37 | 'beanstalkd' => array( 38 | 'driver' => 'beanstalkd', 39 | 'host' => 'localhost', 40 | 'queue' => 'default', 41 | ), 42 | 43 | 'sqs' => array( 44 | 'driver' => 'sqs', 45 | 'key' => 'your-public-key', 46 | 'secret' => 'your-secret-key', 47 | 'queue' => 'your-queue-url', 48 | 'region' => 'us-east-1', 49 | ), 50 | 51 | 'iron' => array( 52 | 'driver' => 'iron', 53 | 'project' => 'your-project-id', 54 | 'token' => 'your-token', 55 | 'queue' => 'your-queue-name', 56 | ), 57 | 58 | 'redis' => array( 59 | 'driver' => 'redis', 60 | 'queue' => 'default', 61 | ), 62 | 63 | ), 64 | 65 | /* 66 | |-------------------------------------------------------------------------- 67 | | Failed Queue Jobs 68 | |-------------------------------------------------------------------------- 69 | | 70 | | These options configure the behavior of failed queue job logging so you 71 | | can control which database and table are used to store the jobs that 72 | | have failed. You may change them to any database / table you wish. 73 | | 74 | */ 75 | 76 | 'failed' => array( 77 | 78 | 'database' => 'mysql', 'table' => 'failed_jobs', 79 | 80 | ), 81 | 82 | ); 83 | -------------------------------------------------------------------------------- /app/config/remote.php: -------------------------------------------------------------------------------- 1 | 'production', 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Remote Server Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | These are the servers that will be accessible via the SSH task runner 24 | | facilities of Laravel. This feature radically simplifies executing 25 | | tasks on your servers, such as deploying out these applications. 26 | | 27 | */ 28 | 29 | 'connections' => array( 30 | 31 | 'production' => array( 32 | 'host' => '', 33 | 'username' => '', 34 | 'password' => '', 35 | 'key' => '', 36 | 'keyphrase' => '', 37 | 'root' => '/var/www', 38 | ), 39 | 40 | ), 41 | 42 | /* 43 | |-------------------------------------------------------------------------- 44 | | Remote Server Groups 45 | |-------------------------------------------------------------------------- 46 | | 47 | | Here you may list connections under a single group name, which allows 48 | | you to easily access all of the servers at once using a short name 49 | | that is extremely easy to remember, such as "web" or "database". 50 | | 51 | */ 52 | 53 | 'groups' => array( 54 | 55 | 'web' => array('production') 56 | 57 | ), 58 | 59 | ); -------------------------------------------------------------------------------- /app/config/session.php: -------------------------------------------------------------------------------- 1 | 'file', 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Session Lifetime 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may specify the number of minutes that you wish the session 27 | | to be allowed to remain idle before it expires. If you want them 28 | | to immediately expire on the browser closing, set that option. 29 | | 30 | */ 31 | 32 | 'lifetime' => 120, 33 | 34 | 'expire_on_close' => false, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Session File Location 39 | |-------------------------------------------------------------------------- 40 | | 41 | | When using the native session driver, we need a location where session 42 | | files may be stored. A default has been set for you but a different 43 | | location may be specified. This is only needed for file sessions. 44 | | 45 | */ 46 | 47 | 'files' => storage_path().'/sessions', 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Session Database Connection 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When using the "database" or "redis" session drivers, you may specify a 55 | | connection that should be used to manage these sessions. This should 56 | | correspond to a connection in your database configuration options. 57 | | 58 | */ 59 | 60 | 'connection' => null, 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Session Database Table 65 | |-------------------------------------------------------------------------- 66 | | 67 | | When using the "database" session driver, you may specify the table we 68 | | should use to manage the sessions. Of course, a sensible default is 69 | | provided for you; however, you are free to change this as needed. 70 | | 71 | */ 72 | 73 | 'table' => 'sessions', 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Session Sweeping Lottery 78 | |-------------------------------------------------------------------------- 79 | | 80 | | Some session drivers must manually sweep their storage location to get 81 | | rid of old sessions from storage. Here are the chances that it will 82 | | happen on a given request. By default, the odds are 2 out of 100. 83 | | 84 | */ 85 | 86 | 'lottery' => array(2, 100), 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Session Cookie Name 91 | |-------------------------------------------------------------------------- 92 | | 93 | | Here you may change the name of the cookie used to identify a session 94 | | instance by ID. The name specified here will get used every time a 95 | | new session cookie is created by the framework for every driver. 96 | | 97 | */ 98 | 99 | 'cookie' => 'laravel_session', 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Session Cookie Path 104 | |-------------------------------------------------------------------------- 105 | | 106 | | The session cookie path determines the path for which the cookie will 107 | | be regarded as available. Typically, this will be the root path of 108 | | your application but you are free to change this when necessary. 109 | | 110 | */ 111 | 112 | 'path' => '/', 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Session Cookie Domain 117 | |-------------------------------------------------------------------------- 118 | | 119 | | Here you may change the domain of the cookie used to identify a session 120 | | in your application. This will determine which domains the cookie is 121 | | available to in your application. A sensible default has been set. 122 | | 123 | */ 124 | 125 | 'domain' => null, 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | HTTPS Only Cookies 130 | |-------------------------------------------------------------------------- 131 | | 132 | | By setting this option to true, session cookies will only be sent back 133 | | to the server if the browser has a HTTPS connection. This will keep 134 | | the cookie from being sent to you if it can not be done securely. 135 | | 136 | */ 137 | 138 | 'secure' => false, 139 | 140 | ); 141 | -------------------------------------------------------------------------------- /app/config/testing/cache.php: -------------------------------------------------------------------------------- 1 | 'array', 19 | 20 | ); -------------------------------------------------------------------------------- /app/config/testing/session.php: -------------------------------------------------------------------------------- 1 | 'array', 20 | 21 | ); -------------------------------------------------------------------------------- /app/config/view.php: -------------------------------------------------------------------------------- 1 | array(__DIR__.'/../views'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Pagination View 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This view will be used to render the pagination link output, and can 24 | | be easily customized here to show any view you like. A clean view 25 | | compatible with Twitter's Bootstrap is given to you by default. 26 | | 27 | */ 28 | 29 | 'pagination' => 'pagination::slider-3', 30 | 31 | ); 32 | -------------------------------------------------------------------------------- /app/config/workbench.php: -------------------------------------------------------------------------------- 1 | '', 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Workbench Author E-Mail Address 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Like the option above, your e-mail address is used when generating new 24 | | workbench packages. The e-mail is placed in your composer.json file 25 | | automatically after the package is created by the workbench tool. 26 | | 27 | */ 28 | 29 | 'email' => '', 30 | 31 | ); -------------------------------------------------------------------------------- /app/controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtrenz/laravel-model-demo/ce0347b9abb046e9b9dea3646f70970136379078/app/controllers/.gitkeep -------------------------------------------------------------------------------- /app/controllers/AuthorController.php: -------------------------------------------------------------------------------- 1 | load('posts'); 20 | 21 | $this->layout->content = View::make('author.show')->with('author', $author); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /app/controllers/BaseController.php: -------------------------------------------------------------------------------- 1 | layout)) 13 | { 14 | $this->layout = View::make($this->layout); 15 | } 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /app/controllers/CategoryController.php: -------------------------------------------------------------------------------- 1 | load('comments'); 20 | 21 | $this->layout->content = View::make('category.show')->with('category', $category); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /app/controllers/HomeController.php: -------------------------------------------------------------------------------- 1 | orderBy('created_at', 'desc')->get(); 19 | 20 | $this->layout->content = View::make('home')->with('posts', $posts); 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /app/controllers/PostController.php: -------------------------------------------------------------------------------- 1 | layout->content = View::make('post.create'); 18 | } 19 | 20 | /** 21 | * Store a newly created resource in storage. 22 | * 23 | * @return Response 24 | */ 25 | public function store() 26 | { 27 | // get POST data 28 | $input = Input::all(); 29 | 30 | // set validation rules 31 | $rules = array( 32 | 'title' => 'required', 33 | 'text' => 'required', 34 | 'image' => 'required', 35 | ); 36 | 37 | // validate input 38 | $validation = Validator::make($input, $rules); 39 | 40 | // if validation fails, return the user to the form w/ validation errors 41 | if ($validation->fails()) { 42 | return Redirect::back()->withErrors($validation)->withInput(); 43 | } else { 44 | // create new Post instance 45 | $post = Post::create(array('title' => $input['title'])); 46 | 47 | // create Text instance w/ text body 48 | $text = Text::create(array('text' => $input['text'])); 49 | 50 | // save new Text and associate w/ new post 51 | $post->text()->save($text); 52 | 53 | // create the new Image 54 | $image = Image::create(array('url' => $input['image'])); 55 | 56 | // save new Text and associate w/ new post 57 | $post->image()->save($image); 58 | 59 | if (isset($input['tags'])) { 60 | foreach ($input['tags'] as $tagId) { 61 | $tag = Tag::find($tagId); 62 | $post->tags()->save($tag); 63 | } 64 | } 65 | 66 | // associate the post with the current user 67 | $post->author()->associate(Auth::user())->save(); 68 | 69 | // redirect to newly created post page 70 | return Redirect::route('post.show', array($post->id)); 71 | } 72 | } 73 | 74 | /** 75 | * Display the specified resource. 76 | * 77 | * @param Post $post 78 | * @return Response 79 | */ 80 | public function show(Post $post) 81 | { 82 | // lazy eager loading 83 | $post->load('text', 'author', 'tags', 'image', 'comments'); 84 | 85 | $this->layout->content = View::make('post.show')->with('post', $post); 86 | } 87 | 88 | } 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /app/controllers/TagController.php: -------------------------------------------------------------------------------- 1 | where('name', 'like', $name)->first(); 20 | 21 | $this->layout->content = View::make('tag.show')->with('tag', $tag); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /app/database/migrations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtrenz/laravel-model-demo/ce0347b9abb046e9b9dea3646f70970136379078/app/database/migrations/.gitkeep -------------------------------------------------------------------------------- /app/database/migrations/2014_01_15_200854_create_posts.php: -------------------------------------------------------------------------------- 1 | increments('id'); 19 | $table->string('title'); 20 | $table->integer('author_id'); 21 | $table->timestamps(); 22 | 23 | // indexes 24 | $table->index('author_id'); 25 | $table->index('created_at'); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('posts'); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /app/database/migrations/2014_01_15_202655_create_texts.php: -------------------------------------------------------------------------------- 1 | increments('id'); 19 | $table->text('text'); 20 | $table->integer('post_id'); 21 | 22 | // indexes 23 | $table->index('post_id'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('texts'); 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /app/database/migrations/2014_01_15_203905_create_tags.php: -------------------------------------------------------------------------------- 1 | increments('id'); 19 | $table->string('name'); 20 | }); 21 | 22 | Schema::create('post_tag', function(Blueprint $table) 23 | { 24 | // columns 25 | $table->integer('post_id'); 26 | $table->integer('tag_id'); 27 | 28 | // indexes 29 | $table->index(array('post_id', 'tag_id')); 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('tags'); 41 | Schema::dropIfExists('post_tag'); 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /app/database/migrations/2014_01_15_204400_create_users.php: -------------------------------------------------------------------------------- 1 | increments('id'); 19 | $table->string('name'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('users'); 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /app/database/migrations/2014_01_15_205010_create_images.php: -------------------------------------------------------------------------------- 1 | increments('id'); 19 | $table->string('url'); 20 | $table->integer('imageable_id'); 21 | $table->string('imageable_type'); 22 | 23 | // indexes 24 | $table->index(array('imageable_id', 'imageable_type')); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('images'); 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /app/database/migrations/2014_01_22_193621_create_categories.php: -------------------------------------------------------------------------------- 1 | increments('id'); 19 | $table->string('name'); 20 | }); 21 | 22 | Schema::table('posts', function(Blueprint $table) 23 | { 24 | // columns 25 | $table->integer('category_id'); 26 | 27 | // indexes 28 | $table->index('category_id'); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('categories'); 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /app/database/migrations/2014_01_22_202355_create_comments.php: -------------------------------------------------------------------------------- 1 | increments('id'); 19 | $table->string('text'); 20 | $table->integer('post_id'); 21 | $table->integer('user_id'); 22 | 23 | // indexes 24 | $table->index('post_id'); 25 | $table->index('user_id'); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('comments'); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /app/database/production.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtrenz/laravel-model-demo/ce0347b9abb046e9b9dea3646f70970136379078/app/database/production.sqlite -------------------------------------------------------------------------------- /app/database/seeds/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtrenz/laravel-model-demo/ce0347b9abb046e9b9dea3646f70970136379078/app/database/seeds/.gitkeep -------------------------------------------------------------------------------- /app/database/seeds/CategorySeeder.php: -------------------------------------------------------------------------------- 1 | delete(); 8 | 9 | Category::create(array( 10 | 'id' => 1, 11 | 'name' => 'Web Development' 12 | )); 13 | 14 | Category::create(array( 15 | 'id' => 2, 16 | 'name' => 'Web Design' 17 | )); 18 | 19 | Category::create(array( 20 | 'id' => 3, 21 | 'name' => 'Testing' 22 | )); 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /app/database/seeds/CommentSeeder.php: -------------------------------------------------------------------------------- 1 | delete(); 8 | 9 | Comment::create(array( 10 | 'text' => 'Great Post, Thanks!', 11 | 'post_id' => 1, 12 | 'user_id' => 1 13 | )); 14 | 15 | Comment::create(array( 16 | 'text' => 'Great Post, Thanks!', 17 | 'post_id' => 1, 18 | 'user_id' => 2 19 | )); 20 | 21 | Comment::create(array( 22 | 'text' => 'Great Post, Thanks!', 23 | 'post_id' => 2, 24 | 'user_id' => 1 25 | )); 26 | 27 | Comment::create(array( 28 | 'text' => 'Great Post, Thanks!', 29 | 'post_id' => 2, 30 | 'user_id' => 2 31 | )); 32 | 33 | Comment::create(array( 34 | 'text' => 'Great Post, Thanks!', 35 | 'post_id' => 3, 36 | 'user_id' => 1 37 | )); 38 | 39 | Comment::create(array( 40 | 'text' => 'Great Post, Thanks!', 41 | 'post_id' => 3, 42 | 'user_id' => 2 43 | )); 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /app/database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call('PostSeeder'); 15 | $this->call('TextSeeder'); 16 | $this->call('TagSeeder'); 17 | $this->call('UserSeeder'); 18 | $this->call('ImageSeeder'); 19 | $this->call('CategorySeeder'); 20 | $this->call('CommentSeeder'); 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /app/database/seeds/ImageSeeder.php: -------------------------------------------------------------------------------- 1 | delete(); 8 | 9 | Image::create(array( 10 | 'url' => 'https://pbs.twimg.com/profile_images/378800000607588261/dad9f009a228a78a14f1f4bed0c54f76.png', 11 | 'imageable_id' => 1, 12 | 'imageable_type' => 'User', 13 | )); 14 | 15 | Image::create(array( 16 | 'url' => 'https://pbs.twimg.com/profile_images/3047681237/0dae20f6642d52ca86482c7d0d63358c.png', 17 | 'imageable_id' => 2, 18 | 'imageable_type' => 'User', 19 | )); 20 | 21 | Image::create(array( 22 | 'url' => '/images/code.png', 23 | 'imageable_id' => 1, 24 | 'imageable_type' => 'Post', 25 | )); 26 | 27 | Image::create(array( 28 | 'url' => '/images/code.png', 29 | 'imageable_id' => 2, 30 | 'imageable_type' => 'Post', 31 | )); 32 | 33 | Image::create(array( 34 | 'url' => '/images/code.png', 35 | 'imageable_id' => 3, 36 | 'imageable_type' => 'Post', 37 | )); 38 | 39 | Image::create(array( 40 | 'url' => '/images/code.png', 41 | 'imageable_id' => 4, 42 | 'imageable_type' => 'Post', 43 | )); 44 | 45 | Image::create(array( 46 | 'url' => '/images/code.png', 47 | 'imageable_id' => 5, 48 | 'imageable_type' => 'Post', 49 | )); 50 | } 51 | } -------------------------------------------------------------------------------- /app/database/seeds/PostSeeder.php: -------------------------------------------------------------------------------- 1 | delete(); 8 | 9 | Post::create(array( 10 | 'id' => 1, 11 | 'title' => 'Post About HTML/CSS', 12 | 'author_id' => 1, 13 | 'category_id' => 1 14 | )); 15 | 16 | Post::create(array( 17 | 'id' => 2, 18 | 'title' => 'Post About PHP', 19 | 'author_id' => 2, 20 | 'category_id' => 2 21 | )); 22 | 23 | Post::create(array( 24 | 'id' => 3, 25 | 'title' => 'Post About PHP/MySQL', 26 | 'author_id' => 1, 27 | 'category_id' => 3 28 | )); 29 | 30 | Post::create(array( 31 | 'id' => 4, 32 | 'title' => 'Post About MongoDB', 33 | 'author_id' => 2, 34 | 'category_id' => 1 35 | )); 36 | 37 | Post::create(array( 38 | 'id' => 5, 39 | 'title' => 'Post About jQuery', 40 | 'author_id' => 1, 41 | 'category_id' => 2 42 | )); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /app/database/seeds/TagSeeder.php: -------------------------------------------------------------------------------- 1 | delete(); 8 | 9 | Tag::create(array( 10 | 'id' => 1, 11 | 'name' => 'PHP' 12 | )); 13 | 14 | Tag::create(array( 15 | 'id' => 2, 16 | 'name' => 'Javascript' 17 | )); 18 | 19 | Tag::create(array( 20 | 'id' => 3, 21 | 'name' => 'CSS' 22 | )); 23 | 24 | Tag::create(array( 25 | 'id' => 4, 26 | 'name' => 'MySQL' 27 | )); 28 | 29 | Tag::create(array( 30 | 'id' => 5, 31 | 'name' => 'HTML' 32 | )); 33 | 34 | Tag::create(array( 35 | 'id' => 6, 36 | 'name' => 'MongoDB' 37 | )); 38 | 39 | DB::table('post_tag')->delete(); 40 | 41 | DB::table('post_tag')->insert(array( 42 | array('post_id' => 1, 'tag_id' => 5), 43 | array('post_id' => 1, 'tag_id' => 3), 44 | array('post_id' => 2, 'tag_id' => 1), 45 | array('post_id' => 3, 'tag_id' => 1), 46 | array('post_id' => 3, 'tag_id' => 4), 47 | array('post_id' => 4, 'tag_id' => 6), 48 | array('post_id' => 5, 'tag_id' => 2), 49 | )); 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /app/database/seeds/TextSeeder.php: -------------------------------------------------------------------------------- 1 | delete(); 8 | 9 | $lorem = << 1, 21 | 'text' => $lorem 22 | )); 23 | 24 | Text::create(array( 25 | 'post_id' => 2, 26 | 'text' => $lorem 27 | )); 28 | 29 | Text::create(array( 30 | 'post_id' => 3, 31 | 'text' => $lorem 32 | )); 33 | 34 | Text::create(array( 35 | 'post_id' => 4, 36 | 'text' => $lorem 37 | )); 38 | 39 | Text::create(array( 40 | 'post_id' => 5, 41 | 'text' => $lorem 42 | )); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /app/database/seeds/UserSeeder.php: -------------------------------------------------------------------------------- 1 | delete(); 8 | 9 | User::create(array( 10 | 'id' => 1, 11 | 'name' => 'Barack Obama' 12 | )); 13 | 14 | User::create(array( 15 | 'id' => 2, 16 | 'name' => 'Grumpy Cat' 17 | )); 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /app/filters.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 18 | 'next' => 'Next »', 19 | 20 | ); -------------------------------------------------------------------------------- /app/lang/en/reminders.php: -------------------------------------------------------------------------------- 1 | "Passwords must be at least six characters and match the confirmation.", 17 | 18 | "user" => "We can't find a user with that e-mail address.", 19 | 20 | "token" => "This password reset token is invalid.", 21 | 22 | "sent" => "Password reminder sent!", 23 | 24 | ); 25 | -------------------------------------------------------------------------------- /app/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | "The :attribute must be accepted.", 17 | "active_url" => "The :attribute is not a valid URL.", 18 | "after" => "The :attribute must be a date after :date.", 19 | "alpha" => "The :attribute may only contain letters.", 20 | "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", 21 | "alpha_num" => "The :attribute may only contain letters and numbers.", 22 | "array" => "The :attribute must be an array.", 23 | "before" => "The :attribute must be a date before :date.", 24 | "between" => array( 25 | "numeric" => "The :attribute must be between :min and :max.", 26 | "file" => "The :attribute must be between :min and :max kilobytes.", 27 | "string" => "The :attribute must be between :min and :max characters.", 28 | "array" => "The :attribute must have between :min and :max items.", 29 | ), 30 | "confirmed" => "The :attribute confirmation does not match.", 31 | "date" => "The :attribute is not a valid date.", 32 | "date_format" => "The :attribute does not match the format :format.", 33 | "different" => "The :attribute and :other must be different.", 34 | "digits" => "The :attribute must be :digits digits.", 35 | "digits_between" => "The :attribute must be between :min and :max digits.", 36 | "email" => "The :attribute format is invalid.", 37 | "exists" => "The selected :attribute is invalid.", 38 | "image" => "The :attribute must be an image.", 39 | "in" => "The selected :attribute is invalid.", 40 | "integer" => "The :attribute must be an integer.", 41 | "ip" => "The :attribute must be a valid IP address.", 42 | "max" => array( 43 | "numeric" => "The :attribute may not be greater than :max.", 44 | "file" => "The :attribute may not be greater than :max kilobytes.", 45 | "string" => "The :attribute may not be greater than :max characters.", 46 | "array" => "The :attribute may not have more than :max items.", 47 | ), 48 | "mimes" => "The :attribute must be a file of type: :values.", 49 | "min" => array( 50 | "numeric" => "The :attribute must be at least :min.", 51 | "file" => "The :attribute must be at least :min kilobytes.", 52 | "string" => "The :attribute must be at least :min characters.", 53 | "array" => "The :attribute must have at least :min items.", 54 | ), 55 | "not_in" => "The selected :attribute is invalid.", 56 | "numeric" => "The :attribute must be a number.", 57 | "regex" => "The :attribute format is invalid.", 58 | "required" => "The :attribute field is required.", 59 | "required_if" => "The :attribute field is required when :other is :value.", 60 | "required_with" => "The :attribute field is required when :values is present.", 61 | "required_without" => "The :attribute field is required when :values is not present.", 62 | "same" => "The :attribute and :other must match.", 63 | "size" => array( 64 | "numeric" => "The :attribute must be :size.", 65 | "file" => "The :attribute must be :size kilobytes.", 66 | "string" => "The :attribute must be :size characters.", 67 | "array" => "The :attribute must contain :size items.", 68 | ), 69 | "unique" => "The :attribute has already been taken.", 70 | "url" => "The :attribute format is invalid.", 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Custom Validation Language Lines 75 | |-------------------------------------------------------------------------- 76 | | 77 | | Here you may specify custom validation messages for attributes using the 78 | | convention "attribute.rule" to name the lines. This makes it quick to 79 | | specify a specific custom language line for a given attribute rule. 80 | | 81 | */ 82 | 83 | 'custom' => array(), 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | Custom Validation Attributes 88 | |-------------------------------------------------------------------------- 89 | | 90 | | The following language lines are used to swap attribute place-holders 91 | | with something more reader friendly such as E-Mail Address instead 92 | | of "email". This simply helps us make messages a little cleaner. 93 | | 94 | */ 95 | 96 | 'attributes' => array(), 97 | 98 | ); 99 | -------------------------------------------------------------------------------- /app/models/Category.php: -------------------------------------------------------------------------------- 1 | hasMany('Post'); 27 | } 28 | 29 | /** 30 | * Defines a has-many-through relationship. 31 | * 32 | * @see http://laravel.com/docs/eloquent#has-many-through 33 | */ 34 | public function comments() 35 | { 36 | return $this->hasManyThrough('Comment', 'Post'); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /app/models/Comment.php: -------------------------------------------------------------------------------- 1 | belongsTo('Post'); 27 | } 28 | 29 | /** 30 | * Defines an inverse one-to-many relationship. 31 | * 32 | * @see http://laravel.com/docs/eloquent#one-to-many 33 | */ 34 | public function user() 35 | { 36 | return $this->belongsTo('User'); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /app/models/Image.php: -------------------------------------------------------------------------------- 1 | morphTo(); 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /app/models/Post.php: -------------------------------------------------------------------------------- 1 | hasOne('Text'); 27 | } 28 | 29 | /** 30 | * Defines an inverse one-to-many relationship. 31 | * 32 | * @see http://laravel.com/docs/eloquent#one-to-many 33 | */ 34 | public function author() 35 | { 36 | return $this->belongsTo('User', 'author_id'); 37 | } 38 | 39 | /** 40 | * Defines a many-to-many relationship. 41 | * 42 | * @see http://laravel.com/docs/eloquent#many-to-many 43 | */ 44 | public function tags() 45 | { 46 | return $this->belongsToMany('Tag'); 47 | } 48 | 49 | /** 50 | * Defines an inverse one-to-many relationship. 51 | * 52 | * @see http://laravel.com/docs/eloquent#one-to-many 53 | */ 54 | public function category() 55 | { 56 | return $this->belongsTo('Category'); 57 | } 58 | 59 | /** 60 | * Defines a polymorphic one-to-one relationship. 61 | * 62 | * @see http://laravel.com/docs/eloquent#polymorphic-relations 63 | */ 64 | public function image() 65 | { 66 | return $this->morphOne('Image', 'imageable'); 67 | } 68 | 69 | /** 70 | * Defines a one-to-many relationship. 71 | * 72 | * @see http://laravel.com/docs/eloquent#one-to-many 73 | */ 74 | public function comments() 75 | { 76 | return $this->hasMany('Comment'); 77 | } 78 | 79 | } -------------------------------------------------------------------------------- /app/models/Tag.php: -------------------------------------------------------------------------------- 1 | belongsToMany('Post'); 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /app/models/Text.php: -------------------------------------------------------------------------------- 1 | belongsTo('Post'); 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /app/models/User.php: -------------------------------------------------------------------------------- 1 | getKey(); 29 | } 30 | 31 | /** 32 | * Get the password for the user. 33 | * 34 | * @return string 35 | */ 36 | public function getAuthPassword() 37 | { 38 | return $this->password; 39 | } 40 | 41 | /** 42 | * Defines a one-to-many relationship. 43 | * 44 | * @see http://laravel.com/docs/eloquent#one-to-many 45 | */ 46 | public function posts() 47 | { 48 | return $this->hasMany('Post', 'author_id'); 49 | } 50 | 51 | /** 52 | * Defines a polymorphic one-to-one relationship. 53 | * 54 | * @see http://laravel.com/docs/eloquent#polymorphic-relations 55 | */ 56 | public function image() 57 | { 58 | return $this->morphOne('Image', 'imageable'); 59 | } 60 | 61 | /** 62 | * Get all distinct tags attached to all posts by author. 63 | * Can't use hasManyThrough on ManyToMany relationships, so we do this instead. 64 | * 65 | * @return array 66 | */ 67 | public function tags() 68 | { 69 | $tags = array(); 70 | 71 | $rows = Tag::select('tags.id', 'tags.name') 72 | ->join('post_tag', 'tags.id', '=', 'post_tag.tag_id') 73 | ->join('posts', 'post_tag.post_id', '=', 'posts.id') 74 | ->where('posts.author_id', $this->id) 75 | ->groupBy('tags.id') 76 | ->orderBy('tags.name') 77 | ->get(); 78 | 79 | foreach ($rows as $row) { 80 | $tags[] = $row; 81 | } 82 | 83 | return $tags; 84 | } 85 | 86 | /** 87 | * Defines a one-to-many relationship. 88 | * 89 | * @see http://laravel.com/docs/eloquent#one-to-many 90 | */ 91 | public function comments() 92 | { 93 | return $this->hasMany('Comment'); 94 | } 95 | 96 | } 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /app/routes.php: -------------------------------------------------------------------------------- 1 | client->request('GET', '/'); 13 | 14 | $this->assertTrue($this->client->getResponse()->isOk()); 15 | } 16 | 17 | } 18 | 19 | # post 20 | # - texts (1:1) 21 | # - tags (*:*) 22 | # ~ users (*:1) 23 | # ~ images (poly) 24 | # 25 | # users 26 | # - posts (1:*) 27 | # ~ images (poly) 28 | # 29 | # images 30 | # - posts (poly) 31 | # - users (poly) 32 | -------------------------------------------------------------------------------- /app/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | 5 | 17 | 18 |
19 |
20 |

Tags

21 |
22 | 23 |
24 |
    25 | @foreach ($author->tags() as $tag) 26 |
  • 27 | {{ $tag->name }} 28 |
  • 29 | @endforeach 30 |
31 |
32 |
33 | 34 |
35 |
36 |

Posts

37 |
38 | 39 |
40 | @foreach ($author->posts as $post) 41 |

42 | {{{ $post->title }}} 43 |

44 | 45 |
46 | {{ nl2br(Str::words($post->text->text, 20)) }} 47 |
48 | @endforeach 49 |
50 |
51 | 52 | @stop -------------------------------------------------------------------------------- /app/views/category/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | 3 | @section('content') 4 | 7 | 8 |
9 |
10 |

Comments on posts in this category:

11 | 12 | @foreach ($category->comments as $comment) 13 | {{{ $comment->user->name }}}: 14 |
15 | "{{{ $comment->text }}}" 16 |
17 | @endforeach 18 |
19 |
20 | 21 |
22 |
23 |

Posts in this category:

24 | 25 | @foreach ($category->posts as $post) 26 |

27 | {{{ $post->title }}} 28 |

29 | 30 |
31 | {{ nl2br(Str::words($post->text->text, 80)) }} 32 |
33 | @endforeach 34 |
35 |
36 | @stop -------------------------------------------------------------------------------- /app/views/emails/auth/reminder.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Password Reset

8 | 9 |
10 | To reset your password, complete this form: {{ URL::to('password/reset', array($token)) }}. 11 |
12 | 13 | -------------------------------------------------------------------------------- /app/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | 3 | @section('content') 4 | 7 | 8 |
9 | @foreach ($posts as $post) 10 |
11 |

12 | {{{ $post->title }}} 13 |

14 | 15 |
16 | {{ nl2br(Str::words($post->text->text, 80)) }} 17 |
18 |
19 | @endforeach 20 |
21 | @stop -------------------------------------------------------------------------------- /app/views/layouts/master.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | My Code Blog 8 | 9 | 10 | 11 | 12 | 13 | 14 | 35 | 36 |
37 |
38 |
39 | @yield('content') 40 |
41 | 42 | 74 |
75 |
76 | 77 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /app/views/post/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | 3 | @section('content') 4 | {{ Form::open(array('route' => 'post.store', 'method' => 'post')) }} 5 |
6 | {{ Form::label('title', 'Post Title') }} 7 | {{ Form::text('title', Input::old('title', 'A New Post About Twitter Bootstrap'), array('placeholder' => 'Post Title', 'class' => 'form-control')) }} 8 |
{{ $errors->first('title'); }}
9 |
10 | 11 |
12 | {{ Form::label('text', 'Post Text') }} 13 | {{ Form::textarea('text', Input::old('text', 'Lorem ipsum dolor sit amet, no vim virtute detracto comprehensam, iudico mentitum inimicus ad cum. Ne vocibus civibus corpora sea. Clita nominati ut est, at wisi accumsan cum. Voluptatum persequeris per an, ut aperiri delenit vix. Et agam eros omittantur cum, mutat cetero sed te. Iuvaret voluptaria sententiae ea qui, choro discere reprehendunt at nam.'), array('placeholder' => 'Post Text', 'class' => 'form-control')) }} 14 |
{{ $errors->first('text'); }}
15 |
16 | 17 |
18 | {{ Form::label('image', 'Image Location') }} 19 | {{ Form::text('image', Input::old('image', '/images/code.png'), array('placeholder' => 'Image Location', 'class' => 'form-control')) }} 20 |
{{ $errors->first('image'); }}
21 |
22 | 23 |
24 | {{ Form::label('tags', 'Tags') }} 25 | 30 |
{{ $errors->first('tags[]'); }}
31 |
32 | 33 | 34 | {{ Form::close() }} 35 | @stop -------------------------------------------------------------------------------- /app/views/post/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | 3 | @section('content') 4 |
5 | 23 | 24 | {{{ $post->title }}} 25 | 26 |

{{ nl2br($post->text->text) }}

27 | 28 |
29 | {{{ $post->author->name }}} 30 |

31 | {{{ $post->author->name }}} is 32 | a really smart web developer who regulary contributes to this blog. 33 |

34 |
35 |
36 |
37 | 38 |
39 |
40 |

Comments

41 |
42 | 43 | @foreach ($post->comments as $comment) 44 |
45 |
46 | {{{ $comment->user->name }}}: 47 |
{{{ $comment->text}}}
48 |
49 |
50 | @endforeach 51 |
52 | @stop -------------------------------------------------------------------------------- /app/views/tag/show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | 3 | @section('content') 4 | 7 | 8 |
9 | @foreach ($tag->posts as $post) 10 |
11 |

12 | {{{ $post->title }}} 13 |

14 | 15 |
16 | {{ nl2br(Str::words($post->text->text, 80)) }} 17 |
18 |
19 | @endforeach 20 |
21 | @stop -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | setRequestForConsoleEnvironment(); 45 | 46 | $artisan = Illuminate\Console\Application::start($app); 47 | 48 | /* 49 | |-------------------------------------------------------------------------- 50 | | Run The Artisan Application 51 | |-------------------------------------------------------------------------- 52 | | 53 | | When we run the console application, the current CLI command will be 54 | | executed in this console and the response sent back to a terminal 55 | | or another output device for the developers. Here goes nothing! 56 | | 57 | */ 58 | 59 | $status = $artisan->run(); 60 | 61 | /* 62 | |-------------------------------------------------------------------------- 63 | | Shutdown The Application 64 | |-------------------------------------------------------------------------- 65 | | 66 | | Once Artisan has finished running. We will fire off the shutdown events 67 | | so that any final work may be done by the application before we shut 68 | | down the process. This is the last thing to happen to the request. 69 | | 70 | */ 71 | 72 | $app->shutdown(); 73 | 74 | exit($status); -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | __DIR__.'/../app', 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Public Path 21 | |-------------------------------------------------------------------------- 22 | | 23 | | The public path contains the assets for your web application, such as 24 | | your JavaScript and CSS files, and also contains the primary entry 25 | | point for web requests into these applications from the outside. 26 | | 27 | */ 28 | 29 | 'public' => __DIR__.'/../public', 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Base Path 34 | |-------------------------------------------------------------------------- 35 | | 36 | | The base path is the root of the Laravel installation. Most likely you 37 | | will not need to change this value. But, if for some wild reason it 38 | | is necessary you will do so here, just proceed with some caution. 39 | | 40 | */ 41 | 42 | 'base' => __DIR__.'/..', 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Storage Path 47 | |-------------------------------------------------------------------------- 48 | | 49 | | The storage path is used by Laravel to store cached Blade views, logs 50 | | and other pieces of information. You may modify the path here when 51 | | you want to change the location of this directory for your apps. 52 | | 53 | */ 54 | 55 | 'storage' => __DIR__.'/../app/storage', 56 | 57 | ); 58 | -------------------------------------------------------------------------------- /bootstrap/start.php: -------------------------------------------------------------------------------- 1 | detectEnvironment(array( 28 | 29 | 'local' => array('your-machine-name'), 30 | 31 | )); 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Bind Paths 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here we are binding the paths configured in paths.php to the app. You 39 | | should not be changing these here. If you need to change these you 40 | | may do so within the paths.php file and they will be bound here. 41 | | 42 | */ 43 | 44 | $app->bindInstallPaths(require __DIR__.'/paths.php'); 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Load The Application 49 | |-------------------------------------------------------------------------- 50 | | 51 | | Here we will load this Illuminate application. We will keep this in a 52 | | separate location so we can isolate the creation of an application 53 | | from the actual running of the application with a given request. 54 | | 55 | */ 56 | 57 | $framework = $app['path.base'].'/vendor/laravel/framework/src'; 58 | 59 | require $framework.'/Illuminate/Foundation/start.php'; 60 | 61 | /* 62 | |-------------------------------------------------------------------------- 63 | | Return The Application 64 | |-------------------------------------------------------------------------- 65 | | 66 | | This script returns the application instance. The instance is given to 67 | | the calling script so we can separate the building of the instances 68 | | from the actual running of the application and sending responses. 69 | | 70 | */ 71 | 72 | return $app; 73 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "require": { 7 | "laravel/framework": "4.1.*" 8 | }, 9 | "autoload": { 10 | "classmap": [ 11 | "app/commands", 12 | "app/controllers", 13 | "app/models", 14 | "app/database/migrations", 15 | "app/database/seeds", 16 | "app/tests/TestCase.php" 17 | ] 18 | }, 19 | "scripts": { 20 | "post-install-cmd": [ 21 | "php artisan optimize" 22 | ], 23 | "post-update-cmd": [ 24 | "php artisan clear-compiled", 25 | "php artisan optimize" 26 | ], 27 | "post-create-project-cmd": [ 28 | "php artisan key:generate" 29 | ] 30 | }, 31 | "config": { 32 | "preferred-install": "dist" 33 | }, 34 | "minimum-stability": "dev" 35 | } 36 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" 5 | ], 6 | "hash": "a78e01ce201fd1c160c5a45b68df5863", 7 | "packages": [ 8 | { 9 | "name": "classpreloader/classpreloader", 10 | "version": "1.0.1", 11 | "source": { 12 | "type": "git", 13 | "url": "https://github.com/mtdowling/ClassPreloader.git", 14 | "reference": "1a50f7945b725ff2c60f234e51407d1d6e7c77c5" 15 | }, 16 | "dist": { 17 | "type": "zip", 18 | "url": "https://api.github.com/repos/mtdowling/ClassPreloader/zipball/1a50f7945b725ff2c60f234e51407d1d6e7c77c5", 19 | "reference": "1a50f7945b725ff2c60f234e51407d1d6e7c77c5", 20 | "shasum": "" 21 | }, 22 | "require": { 23 | "nikic/php-parser": "*", 24 | "php": ">=5.3.3", 25 | "symfony/console": ">2.0", 26 | "symfony/filesystem": ">2.0", 27 | "symfony/finder": ">2.0" 28 | }, 29 | "bin": [ 30 | "classpreloader.php" 31 | ], 32 | "type": "library", 33 | "extra": { 34 | "branch-alias": { 35 | "dev-master": "1.0.0-dev" 36 | } 37 | }, 38 | "autoload": { 39 | "psr-0": { 40 | "ClassPreloader": "src/" 41 | } 42 | }, 43 | "notification-url": "https://packagist.org/downloads/", 44 | "license": [ 45 | "MIT" 46 | ], 47 | "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", 48 | "keywords": [ 49 | "autoload", 50 | "class", 51 | "preload" 52 | ], 53 | "time": "2013-06-24 22:58:34" 54 | }, 55 | { 56 | "name": "d11wtq/boris", 57 | "version": "v1.0.8", 58 | "source": { 59 | "type": "git", 60 | "url": "https://github.com/d11wtq/boris.git", 61 | "reference": "125dd4e5752639af7678a22ea597115646d89c6e" 62 | }, 63 | "dist": { 64 | "type": "zip", 65 | "url": "https://api.github.com/repos/d11wtq/boris/zipball/125dd4e5752639af7678a22ea597115646d89c6e", 66 | "reference": "125dd4e5752639af7678a22ea597115646d89c6e", 67 | "shasum": "" 68 | }, 69 | "require": { 70 | "php": ">=5.3.0" 71 | }, 72 | "suggest": { 73 | "ext-pcntl": "*", 74 | "ext-posix": "*", 75 | "ext-readline": "*" 76 | }, 77 | "bin": [ 78 | "bin/boris" 79 | ], 80 | "type": "library", 81 | "autoload": { 82 | "psr-0": { 83 | "Boris": "lib" 84 | } 85 | }, 86 | "notification-url": "https://packagist.org/downloads/", 87 | "time": "2014-01-17 12:21:18" 88 | }, 89 | { 90 | "name": "filp/whoops", 91 | "version": "1.0.10", 92 | "source": { 93 | "type": "git", 94 | "url": "https://github.com/filp/whoops.git", 95 | "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a" 96 | }, 97 | "dist": { 98 | "type": "zip", 99 | "url": "https://api.github.com/repos/filp/whoops/zipball/91e3fd4b0812017ffbeb24add55330664e1ea32a", 100 | "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a", 101 | "shasum": "" 102 | }, 103 | "require": { 104 | "php": ">=5.3.0" 105 | }, 106 | "require-dev": { 107 | "mockery/mockery": "dev-master", 108 | "silex/silex": "1.0.*@dev" 109 | }, 110 | "type": "library", 111 | "autoload": { 112 | "psr-0": { 113 | "Whoops": "src/" 114 | } 115 | }, 116 | "notification-url": "https://packagist.org/downloads/", 117 | "license": [ 118 | "MIT" 119 | ], 120 | "authors": [ 121 | { 122 | "name": "Filipe Dobreira", 123 | "homepage": "https://github.com/filp", 124 | "role": "Developer" 125 | } 126 | ], 127 | "description": "php error handling for cool kids", 128 | "homepage": "https://github.com/filp/whoops", 129 | "keywords": [ 130 | "error", 131 | "exception", 132 | "handling", 133 | "library", 134 | "silex-provider", 135 | "whoops", 136 | "zf2" 137 | ], 138 | "time": "2013-12-04 14:19:30" 139 | }, 140 | { 141 | "name": "ircmaxell/password-compat", 142 | "version": "1.0.x-dev", 143 | "source": { 144 | "type": "git", 145 | "url": "https://github.com/ircmaxell/password_compat.git", 146 | "reference": "1fc1521b5e9794ea77e4eca30717be9635f1d4f4" 147 | }, 148 | "dist": { 149 | "type": "zip", 150 | "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/1fc1521b5e9794ea77e4eca30717be9635f1d4f4", 151 | "reference": "1fc1521b5e9794ea77e4eca30717be9635f1d4f4", 152 | "shasum": "" 153 | }, 154 | "type": "library", 155 | "autoload": { 156 | "files": [ 157 | "lib/password.php" 158 | ] 159 | }, 160 | "notification-url": "https://packagist.org/downloads/", 161 | "license": [ 162 | "MIT" 163 | ], 164 | "authors": [ 165 | { 166 | "name": "Anthony Ferrara", 167 | "email": "ircmaxell@php.net", 168 | "homepage": "http://blog.ircmaxell.com" 169 | } 170 | ], 171 | "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", 172 | "homepage": "https://github.com/ircmaxell/password_compat", 173 | "keywords": [ 174 | "hashing", 175 | "password" 176 | ], 177 | "time": "2013-04-30 19:58:08" 178 | }, 179 | { 180 | "name": "jeremeamia/SuperClosure", 181 | "version": "1.0.1", 182 | "source": { 183 | "type": "git", 184 | "url": "https://github.com/jeremeamia/super_closure.git", 185 | "reference": "d05400085f7d4ae6f20ba30d36550836c0d061e8" 186 | }, 187 | "dist": { 188 | "type": "zip", 189 | "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/d05400085f7d4ae6f20ba30d36550836c0d061e8", 190 | "reference": "d05400085f7d4ae6f20ba30d36550836c0d061e8", 191 | "shasum": "" 192 | }, 193 | "require": { 194 | "nikic/php-parser": "~0.9", 195 | "php": ">=5.3.3" 196 | }, 197 | "require-dev": { 198 | "phpunit/phpunit": "~3.7" 199 | }, 200 | "type": "library", 201 | "autoload": { 202 | "psr-0": { 203 | "Jeremeamia\\SuperClosure": "src/" 204 | } 205 | }, 206 | "notification-url": "https://packagist.org/downloads/", 207 | "license": [ 208 | "MIT" 209 | ], 210 | "authors": [ 211 | { 212 | "name": "Jeremy Lindblom" 213 | } 214 | ], 215 | "description": "Doing interesting things with closures like serialization.", 216 | "homepage": "https://github.com/jeremeamia/super_closure", 217 | "keywords": [ 218 | "closure", 219 | "function", 220 | "parser", 221 | "serializable", 222 | "serialize", 223 | "tokenizer" 224 | ], 225 | "time": "2013-10-09 04:20:00" 226 | }, 227 | { 228 | "name": "laravel/framework", 229 | "version": "4.1.x-dev", 230 | "source": { 231 | "type": "git", 232 | "url": "https://github.com/laravel/framework.git", 233 | "reference": "24c9aafb913ea7aeb0c2522428025477b77f235c" 234 | }, 235 | "dist": { 236 | "type": "zip", 237 | "url": "https://api.github.com/repos/laravel/framework/zipball/24c9aafb913ea7aeb0c2522428025477b77f235c", 238 | "reference": "24c9aafb913ea7aeb0c2522428025477b77f235c", 239 | "shasum": "" 240 | }, 241 | "require": { 242 | "classpreloader/classpreloader": "1.0.*", 243 | "d11wtq/boris": "1.0.*", 244 | "filp/whoops": "1.0.10", 245 | "ircmaxell/password-compat": "1.0.*", 246 | "jeremeamia/superclosure": "1.0.*", 247 | "monolog/monolog": "1.*", 248 | "nesbot/carbon": "1.*", 249 | "patchwork/utf8": "1.1.*", 250 | "php": ">=5.3.0", 251 | "phpseclib/phpseclib": "0.3.*", 252 | "predis/predis": "0.8.*", 253 | "stack/builder": "1.0.*", 254 | "swiftmailer/swiftmailer": "5.0.*", 255 | "symfony/browser-kit": "2.4.*", 256 | "symfony/console": "2.4.*", 257 | "symfony/css-selector": "2.4.*", 258 | "symfony/debug": "2.4.*", 259 | "symfony/dom-crawler": "2.4.*", 260 | "symfony/finder": "2.4.*", 261 | "symfony/http-foundation": "2.4.*", 262 | "symfony/http-kernel": "2.4.*", 263 | "symfony/process": "2.4.*", 264 | "symfony/routing": "2.4.*", 265 | "symfony/translation": "2.4.*" 266 | }, 267 | "replace": { 268 | "illuminate/auth": "self.version", 269 | "illuminate/cache": "self.version", 270 | "illuminate/config": "self.version", 271 | "illuminate/console": "self.version", 272 | "illuminate/container": "self.version", 273 | "illuminate/cookie": "self.version", 274 | "illuminate/database": "self.version", 275 | "illuminate/encryption": "self.version", 276 | "illuminate/events": "self.version", 277 | "illuminate/exception": "self.version", 278 | "illuminate/filesystem": "self.version", 279 | "illuminate/foundation": "self.version", 280 | "illuminate/hashing": "self.version", 281 | "illuminate/html": "self.version", 282 | "illuminate/http": "self.version", 283 | "illuminate/log": "self.version", 284 | "illuminate/mail": "self.version", 285 | "illuminate/pagination": "self.version", 286 | "illuminate/queue": "self.version", 287 | "illuminate/redis": "self.version", 288 | "illuminate/routing": "self.version", 289 | "illuminate/session": "self.version", 290 | "illuminate/support": "self.version", 291 | "illuminate/translation": "self.version", 292 | "illuminate/validation": "self.version", 293 | "illuminate/view": "self.version", 294 | "illuminate/workbench": "self.version" 295 | }, 296 | "require-dev": { 297 | "aws/aws-sdk-php": "2.5.*", 298 | "iron-io/iron_mq": "1.4.*", 299 | "mockery/mockery": "0.8.0", 300 | "pda/pheanstalk": "2.1.*", 301 | "phpunit/phpunit": "3.7.*" 302 | }, 303 | "suggest": { 304 | "doctrine/dbal": "Allow renaming columns and dropping SQLite columns." 305 | }, 306 | "type": "library", 307 | "extra": { 308 | "branch-alias": { 309 | "dev-master": "4.1-dev" 310 | } 311 | }, 312 | "autoload": { 313 | "classmap": [ 314 | [ 315 | "src/Illuminate/Queue/IlluminateQueueClosure.php" 316 | ] 317 | ], 318 | "files": [ 319 | "src/Illuminate/Support/helpers.php" 320 | ], 321 | "psr-0": { 322 | "Illuminate": "src/" 323 | } 324 | }, 325 | "notification-url": "https://packagist.org/downloads/", 326 | "license": [ 327 | "MIT" 328 | ], 329 | "authors": [ 330 | { 331 | "name": "Taylor Otwell", 332 | "email": "taylorotwell@gmail.com", 333 | "homepage": "https://github.com/taylorotwell", 334 | "role": "Developer" 335 | } 336 | ], 337 | "description": "The Laravel Framework.", 338 | "keywords": [ 339 | "framework", 340 | "laravel" 341 | ], 342 | "time": "2014-01-20 04:32:11" 343 | }, 344 | { 345 | "name": "monolog/monolog", 346 | "version": "dev-master", 347 | "source": { 348 | "type": "git", 349 | "url": "https://github.com/Seldaek/monolog.git", 350 | "reference": "7f783c0ab09dc341f858882e2d2ce6fc36ca1351" 351 | }, 352 | "dist": { 353 | "type": "zip", 354 | "url": "https://api.github.com/repos/Seldaek/monolog/zipball/7f783c0ab09dc341f858882e2d2ce6fc36ca1351", 355 | "reference": "7f783c0ab09dc341f858882e2d2ce6fc36ca1351", 356 | "shasum": "" 357 | }, 358 | "require": { 359 | "php": ">=5.3.0", 360 | "psr/log": "~1.0" 361 | }, 362 | "require-dev": { 363 | "aws/aws-sdk-php": "~2.4.8", 364 | "doctrine/couchdb": "dev-master", 365 | "mlehner/gelf-php": "1.0.*", 366 | "phpunit/phpunit": "~3.7.0", 367 | "raven/raven": "~0.5", 368 | "ruflin/elastica": "0.90.*" 369 | }, 370 | "suggest": { 371 | "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", 372 | "doctrine/couchdb": "Allow sending log messages to a CouchDB server", 373 | "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", 374 | "ext-mongo": "Allow sending log messages to a MongoDB server", 375 | "mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server", 376 | "raven/raven": "Allow sending log messages to a Sentry server", 377 | "ruflin/elastica": "Allow sending log messages to an Elastic Search server" 378 | }, 379 | "type": "library", 380 | "extra": { 381 | "branch-alias": { 382 | "dev-master": "1.7.x-dev" 383 | } 384 | }, 385 | "autoload": { 386 | "psr-0": { 387 | "Monolog": "src/" 388 | } 389 | }, 390 | "notification-url": "https://packagist.org/downloads/", 391 | "license": [ 392 | "MIT" 393 | ], 394 | "authors": [ 395 | { 396 | "name": "Jordi Boggiano", 397 | "email": "j.boggiano@seld.be", 398 | "homepage": "http://seld.be", 399 | "role": "Developer" 400 | } 401 | ], 402 | "description": "Sends your logs to files, sockets, inboxes, databases and various web services", 403 | "homepage": "http://github.com/Seldaek/monolog", 404 | "keywords": [ 405 | "log", 406 | "logging", 407 | "psr-3" 408 | ], 409 | "time": "2014-01-17 14:16:06" 410 | }, 411 | { 412 | "name": "nesbot/carbon", 413 | "version": "1.8.0", 414 | "source": { 415 | "type": "git", 416 | "url": "https://github.com/briannesbitt/Carbon.git", 417 | "reference": "21c4cb4301969c7d85aee8a62eefdfa881413af0" 418 | }, 419 | "dist": { 420 | "type": "zip", 421 | "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/21c4cb4301969c7d85aee8a62eefdfa881413af0", 422 | "reference": "21c4cb4301969c7d85aee8a62eefdfa881413af0", 423 | "shasum": "" 424 | }, 425 | "require": { 426 | "php": ">=5.3.0" 427 | }, 428 | "require-dev": { 429 | "phpunit/phpunit": "3.7.*" 430 | }, 431 | "type": "library", 432 | "autoload": { 433 | "psr-0": { 434 | "Carbon": "src" 435 | } 436 | }, 437 | "notification-url": "https://packagist.org/downloads/", 438 | "license": [ 439 | "MIT" 440 | ], 441 | "authors": [ 442 | { 443 | "name": "Brian Nesbitt", 444 | "email": "brian@nesbot.com", 445 | "homepage": "http://nesbot.com" 446 | } 447 | ], 448 | "description": "A simple API extension for DateTime.", 449 | "homepage": "https://github.com/briannesbitt/Carbon", 450 | "keywords": [ 451 | "date", 452 | "datetime", 453 | "time" 454 | ], 455 | "time": "2014-01-07 05:10:44" 456 | }, 457 | { 458 | "name": "nikic/php-parser", 459 | "version": "dev-master", 460 | "source": { 461 | "type": "git", 462 | "url": "https://github.com/nikic/PHP-Parser.git", 463 | "reference": "0353c921bd12980399e3e6404ea3931b3356e15a" 464 | }, 465 | "dist": { 466 | "type": "zip", 467 | "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0353c921bd12980399e3e6404ea3931b3356e15a", 468 | "reference": "0353c921bd12980399e3e6404ea3931b3356e15a", 469 | "shasum": "" 470 | }, 471 | "require": { 472 | "ext-tokenizer": "*", 473 | "php": ">=5.2" 474 | }, 475 | "type": "library", 476 | "extra": { 477 | "branch-alias": { 478 | "dev-master": "0.9-dev" 479 | } 480 | }, 481 | "autoload": { 482 | "psr-0": { 483 | "PHPParser": "lib/" 484 | } 485 | }, 486 | "notification-url": "https://packagist.org/downloads/", 487 | "license": [ 488 | "BSD-3-Clause" 489 | ], 490 | "authors": [ 491 | { 492 | "name": "Nikita Popov" 493 | } 494 | ], 495 | "description": "A PHP parser written in PHP", 496 | "keywords": [ 497 | "parser", 498 | "php" 499 | ], 500 | "time": "2013-11-27 19:33:56" 501 | }, 502 | { 503 | "name": "patchwork/utf8", 504 | "version": "v1.1.17", 505 | "source": { 506 | "type": "git", 507 | "url": "https://github.com/nicolas-grekas/Patchwork-UTF8.git", 508 | "reference": "1396fedf134f71d479236fce0833dc4c88079391" 509 | }, 510 | "dist": { 511 | "type": "zip", 512 | "url": "https://api.github.com/repos/nicolas-grekas/Patchwork-UTF8/zipball/1396fedf134f71d479236fce0833dc4c88079391", 513 | "reference": "1396fedf134f71d479236fce0833dc4c88079391", 514 | "shasum": "" 515 | }, 516 | "require": { 517 | "lib-pcre": ">=7.9", 518 | "php": ">=5.3.0" 519 | }, 520 | "suggest": { 521 | "ext-iconv": "Use iconv for best performance", 522 | "ext-intl": "Use Intl for best performance", 523 | "ext-mbstring": "Use Mbstring for best performance" 524 | }, 525 | "type": "library", 526 | "autoload": { 527 | "psr-0": { 528 | "Patchwork": "class/", 529 | "Normalizer": "class/" 530 | } 531 | }, 532 | "notification-url": "https://packagist.org/downloads/", 533 | "license": [ 534 | "(Apache-2.0 or GPL-2.0)" 535 | ], 536 | "authors": [ 537 | { 538 | "name": "Nicolas Grekas", 539 | "email": "p@tchwork.com", 540 | "role": "Developer" 541 | } 542 | ], 543 | "description": "Extensive, portable and performant handling of UTF-8 and grapheme clusters for PHP", 544 | "homepage": "https://github.com/nicolas-grekas/Patchwork-UTF8", 545 | "keywords": [ 546 | "i18n", 547 | "unicode", 548 | "utf-8", 549 | "utf8" 550 | ], 551 | "time": "2014-01-02 10:19:36" 552 | }, 553 | { 554 | "name": "phpseclib/phpseclib", 555 | "version": "dev-master", 556 | "source": { 557 | "type": "git", 558 | "url": "https://github.com/phpseclib/phpseclib.git", 559 | "reference": "211e237090842f0bc1813b639633e05267fb0444" 560 | }, 561 | "dist": { 562 | "type": "zip", 563 | "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/211e237090842f0bc1813b639633e05267fb0444", 564 | "reference": "211e237090842f0bc1813b639633e05267fb0444", 565 | "shasum": "" 566 | }, 567 | "require": { 568 | "php": ">=5.0.0" 569 | }, 570 | "require-dev": { 571 | "squizlabs/php_codesniffer": "1.*" 572 | }, 573 | "suggest": { 574 | "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", 575 | "ext-mcrypt": "Install the Mcrypt extension in order to speed up a wide variety of cryptographic operations.", 576 | "pear-pear/PHP_Compat": "Install PHP_Compat to get phpseclib working on PHP >= 4.3.3." 577 | }, 578 | "type": "library", 579 | "extra": { 580 | "branch-alias": { 581 | "dev-master": "0.3-dev" 582 | } 583 | }, 584 | "autoload": { 585 | "psr-0": { 586 | "Crypt": "phpseclib/", 587 | "File": "phpseclib/", 588 | "Math": "phpseclib/", 589 | "Net": "phpseclib/" 590 | }, 591 | "files": [ 592 | "phpseclib/Crypt/Random.php" 593 | ] 594 | }, 595 | "notification-url": "https://packagist.org/downloads/", 596 | "include-path": [ 597 | "phpseclib/" 598 | ], 599 | "license": [ 600 | "MIT" 601 | ], 602 | "authors": [ 603 | { 604 | "name": "Jim Wigginton", 605 | "email": "terrafrost@php.net", 606 | "role": "Lead Developer" 607 | }, 608 | { 609 | "name": "Patrick Monnerat", 610 | "email": "pm@datasphere.ch", 611 | "role": "Developer" 612 | }, 613 | { 614 | "name": "Andreas Fischer", 615 | "email": "bantu@phpbb.com", 616 | "role": "Developer" 617 | }, 618 | { 619 | "name": "Hans-Jürgen Petrich", 620 | "email": "petrich@tronic-media.com", 621 | "role": "Developer" 622 | } 623 | ], 624 | "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", 625 | "homepage": "http://phpseclib.sourceforge.net", 626 | "keywords": [ 627 | "BigInteger", 628 | "aes", 629 | "asn.1", 630 | "asn1", 631 | "blowfish", 632 | "crypto", 633 | "cryptography", 634 | "encryption", 635 | "rsa", 636 | "security", 637 | "sftp", 638 | "signature", 639 | "signing", 640 | "ssh", 641 | "twofish", 642 | "x.509", 643 | "x509" 644 | ], 645 | "time": "2014-01-18 17:51:33" 646 | }, 647 | { 648 | "name": "predis/predis", 649 | "version": "0.8.x-dev", 650 | "source": { 651 | "type": "git", 652 | "url": "https://github.com/nrk/predis.git", 653 | "reference": "5f2eea628eb465d866ad2771927d83769c8f956c" 654 | }, 655 | "dist": { 656 | "type": "zip", 657 | "url": "https://api.github.com/repos/nrk/predis/zipball/5f2eea628eb465d866ad2771927d83769c8f956c", 658 | "reference": "5f2eea628eb465d866ad2771927d83769c8f956c", 659 | "shasum": "" 660 | }, 661 | "require": { 662 | "php": ">=5.3.2" 663 | }, 664 | "suggest": { 665 | "ext-curl": "Allows access to Webdis when paired with phpiredis", 666 | "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" 667 | }, 668 | "type": "library", 669 | "autoload": { 670 | "psr-0": { 671 | "Predis": "lib/" 672 | } 673 | }, 674 | "notification-url": "https://packagist.org/downloads/", 675 | "license": [ 676 | "MIT" 677 | ], 678 | "authors": [ 679 | { 680 | "name": "Daniele Alessandri", 681 | "email": "suppakilla@gmail.com", 682 | "homepage": "http://clorophilla.net" 683 | } 684 | ], 685 | "description": "Flexible and feature-complete PHP client library for Redis", 686 | "homepage": "http://github.com/nrk/predis", 687 | "keywords": [ 688 | "nosql", 689 | "predis", 690 | "redis" 691 | ], 692 | "time": "2014-01-16 14:10:29" 693 | }, 694 | { 695 | "name": "psr/log", 696 | "version": "dev-master", 697 | "source": { 698 | "type": "git", 699 | "url": "https://github.com/php-fig/log.git", 700 | "reference": "a78d6504ff5d4367497785ab2ade91db3a9fbe11" 701 | }, 702 | "dist": { 703 | "type": "zip", 704 | "url": "https://api.github.com/repos/php-fig/log/zipball/a78d6504ff5d4367497785ab2ade91db3a9fbe11", 705 | "reference": "a78d6504ff5d4367497785ab2ade91db3a9fbe11", 706 | "shasum": "" 707 | }, 708 | "type": "library", 709 | "extra": { 710 | "branch-alias": { 711 | "dev-master": "1.0.x-dev" 712 | } 713 | }, 714 | "autoload": { 715 | "psr-0": { 716 | "Psr\\Log\\": "" 717 | } 718 | }, 719 | "notification-url": "https://packagist.org/downloads/", 720 | "license": [ 721 | "MIT" 722 | ], 723 | "authors": [ 724 | { 725 | "name": "PHP-FIG", 726 | "homepage": "http://www.php-fig.org/" 727 | } 728 | ], 729 | "description": "Common interface for logging libraries", 730 | "keywords": [ 731 | "log", 732 | "psr", 733 | "psr-3" 734 | ], 735 | "time": "2014-01-18 15:33:09" 736 | }, 737 | { 738 | "name": "stack/builder", 739 | "version": "dev-master", 740 | "source": { 741 | "type": "git", 742 | "url": "https://github.com/stackphp/builder.git", 743 | "reference": "f98a5eb77b212a77b67a70f74d856ae859dd74b3" 744 | }, 745 | "dist": { 746 | "type": "zip", 747 | "url": "https://api.github.com/repos/stackphp/builder/zipball/f98a5eb77b212a77b67a70f74d856ae859dd74b3", 748 | "reference": "f98a5eb77b212a77b67a70f74d856ae859dd74b3", 749 | "shasum": "" 750 | }, 751 | "require": { 752 | "php": ">=5.3.0", 753 | "symfony/http-foundation": "~2.1", 754 | "symfony/http-kernel": "~2.1" 755 | }, 756 | "require-dev": { 757 | "silex/silex": "~1.0" 758 | }, 759 | "type": "library", 760 | "extra": { 761 | "branch-alias": { 762 | "dev-master": "1.0-dev" 763 | } 764 | }, 765 | "autoload": { 766 | "psr-0": { 767 | "Stack": "src" 768 | } 769 | }, 770 | "notification-url": "https://packagist.org/downloads/", 771 | "license": [ 772 | "MIT" 773 | ], 774 | "authors": [ 775 | { 776 | "name": "Igor Wiedler", 777 | "email": "igor@wiedler.ch", 778 | "homepage": "http://wiedler.ch/igor/" 779 | } 780 | ], 781 | "description": "Builder for stack middlewares based on HttpKernelInterface.", 782 | "keywords": [ 783 | "stack" 784 | ], 785 | "time": "2014-01-18 16:33:58" 786 | }, 787 | { 788 | "name": "swiftmailer/swiftmailer", 789 | "version": "v5.0.3", 790 | "source": { 791 | "type": "git", 792 | "url": "https://github.com/swiftmailer/swiftmailer.git", 793 | "reference": "32edc3b0de0fdc1b10f5c4912e8677b3f411a230" 794 | }, 795 | "dist": { 796 | "type": "zip", 797 | "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/32edc3b0de0fdc1b10f5c4912e8677b3f411a230", 798 | "reference": "32edc3b0de0fdc1b10f5c4912e8677b3f411a230", 799 | "shasum": "" 800 | }, 801 | "require": { 802 | "php": ">=5.2.4" 803 | }, 804 | "type": "library", 805 | "extra": { 806 | "branch-alias": { 807 | "dev-master": "5.1-dev" 808 | } 809 | }, 810 | "autoload": { 811 | "files": [ 812 | "lib/swift_required.php" 813 | ] 814 | }, 815 | "notification-url": "https://packagist.org/downloads/", 816 | "license": [ 817 | "MIT" 818 | ], 819 | "authors": [ 820 | { 821 | "name": "Fabien Potencier", 822 | "email": "fabien@symfony.com" 823 | }, 824 | { 825 | "name": "Chris Corbyn" 826 | } 827 | ], 828 | "description": "Swiftmailer, free feature-rich PHP mailer", 829 | "homepage": "http://swiftmailer.org", 830 | "keywords": [ 831 | "mail", 832 | "mailer" 833 | ], 834 | "time": "2013-12-03 13:33:24" 835 | }, 836 | { 837 | "name": "symfony/browser-kit", 838 | "version": "2.4.x-dev", 839 | "target-dir": "Symfony/Component/BrowserKit", 840 | "source": { 841 | "type": "git", 842 | "url": "https://github.com/symfony/BrowserKit.git", 843 | "reference": "c6b3cd51651f445908a11f3f81f965a157daef38" 844 | }, 845 | "dist": { 846 | "type": "zip", 847 | "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/c6b3cd51651f445908a11f3f81f965a157daef38", 848 | "reference": "c6b3cd51651f445908a11f3f81f965a157daef38", 849 | "shasum": "" 850 | }, 851 | "require": { 852 | "php": ">=5.3.3", 853 | "symfony/dom-crawler": "~2.0" 854 | }, 855 | "require-dev": { 856 | "symfony/css-selector": "~2.0", 857 | "symfony/process": "~2.0" 858 | }, 859 | "suggest": { 860 | "symfony/process": "" 861 | }, 862 | "type": "library", 863 | "extra": { 864 | "branch-alias": { 865 | "dev-master": "2.4-dev" 866 | } 867 | }, 868 | "autoload": { 869 | "psr-0": { 870 | "Symfony\\Component\\BrowserKit\\": "" 871 | } 872 | }, 873 | "notification-url": "https://packagist.org/downloads/", 874 | "license": [ 875 | "MIT" 876 | ], 877 | "authors": [ 878 | { 879 | "name": "Fabien Potencier", 880 | "email": "fabien@symfony.com" 881 | }, 882 | { 883 | "name": "Symfony Community", 884 | "homepage": "http://symfony.com/contributors" 885 | } 886 | ], 887 | "description": "Symfony BrowserKit Component", 888 | "homepage": "http://symfony.com", 889 | "time": "2014-01-07 13:28:54" 890 | }, 891 | { 892 | "name": "symfony/console", 893 | "version": "2.4.x-dev", 894 | "target-dir": "Symfony/Component/Console", 895 | "source": { 896 | "type": "git", 897 | "url": "https://github.com/symfony/Console.git", 898 | "reference": "86e13d5b06146fbe81006570ad26cb7cbeafba15" 899 | }, 900 | "dist": { 901 | "type": "zip", 902 | "url": "https://api.github.com/repos/symfony/Console/zipball/86e13d5b06146fbe81006570ad26cb7cbeafba15", 903 | "reference": "86e13d5b06146fbe81006570ad26cb7cbeafba15", 904 | "shasum": "" 905 | }, 906 | "require": { 907 | "php": ">=5.3.3" 908 | }, 909 | "require-dev": { 910 | "symfony/event-dispatcher": "~2.1" 911 | }, 912 | "suggest": { 913 | "symfony/event-dispatcher": "" 914 | }, 915 | "type": "library", 916 | "extra": { 917 | "branch-alias": { 918 | "dev-master": "2.4-dev" 919 | } 920 | }, 921 | "autoload": { 922 | "psr-0": { 923 | "Symfony\\Component\\Console\\": "" 924 | } 925 | }, 926 | "notification-url": "https://packagist.org/downloads/", 927 | "license": [ 928 | "MIT" 929 | ], 930 | "authors": [ 931 | { 932 | "name": "Fabien Potencier", 933 | "email": "fabien@symfony.com" 934 | }, 935 | { 936 | "name": "Symfony Community", 937 | "homepage": "http://symfony.com/contributors" 938 | } 939 | ], 940 | "description": "Symfony Console Component", 941 | "homepage": "http://symfony.com", 942 | "time": "2014-01-07 13:28:54" 943 | }, 944 | { 945 | "name": "symfony/css-selector", 946 | "version": "2.4.x-dev", 947 | "target-dir": "Symfony/Component/CssSelector", 948 | "source": { 949 | "type": "git", 950 | "url": "https://github.com/symfony/CssSelector.git", 951 | "reference": "251273e7700b93a24012d4113ee5681a9000de5a" 952 | }, 953 | "dist": { 954 | "type": "zip", 955 | "url": "https://api.github.com/repos/symfony/CssSelector/zipball/251273e7700b93a24012d4113ee5681a9000de5a", 956 | "reference": "251273e7700b93a24012d4113ee5681a9000de5a", 957 | "shasum": "" 958 | }, 959 | "require": { 960 | "php": ">=5.3.3" 961 | }, 962 | "type": "library", 963 | "extra": { 964 | "branch-alias": { 965 | "dev-master": "2.4-dev" 966 | } 967 | }, 968 | "autoload": { 969 | "psr-0": { 970 | "Symfony\\Component\\CssSelector\\": "" 971 | } 972 | }, 973 | "notification-url": "https://packagist.org/downloads/", 974 | "license": [ 975 | "MIT" 976 | ], 977 | "authors": [ 978 | { 979 | "name": "Fabien Potencier", 980 | "email": "fabien@symfony.com" 981 | }, 982 | { 983 | "name": "Symfony Community", 984 | "homepage": "http://symfony.com/contributors" 985 | }, 986 | { 987 | "name": "Jean-François Simon", 988 | "email": "jeanfrancois.simon@sensiolabs.com" 989 | } 990 | ], 991 | "description": "Symfony CssSelector Component", 992 | "homepage": "http://symfony.com", 993 | "time": "2014-01-07 13:28:54" 994 | }, 995 | { 996 | "name": "symfony/debug", 997 | "version": "2.4.x-dev", 998 | "target-dir": "Symfony/Component/Debug", 999 | "source": { 1000 | "type": "git", 1001 | "url": "https://github.com/symfony/Debug.git", 1002 | "reference": "7bd04476b53d676189196ba4c526ccde4302a8de" 1003 | }, 1004 | "dist": { 1005 | "type": "zip", 1006 | "url": "https://api.github.com/repos/symfony/Debug/zipball/7bd04476b53d676189196ba4c526ccde4302a8de", 1007 | "reference": "7bd04476b53d676189196ba4c526ccde4302a8de", 1008 | "shasum": "" 1009 | }, 1010 | "require": { 1011 | "php": ">=5.3.3" 1012 | }, 1013 | "require-dev": { 1014 | "symfony/http-foundation": "~2.1", 1015 | "symfony/http-kernel": "~2.1" 1016 | }, 1017 | "suggest": { 1018 | "symfony/http-foundation": "", 1019 | "symfony/http-kernel": "" 1020 | }, 1021 | "type": "library", 1022 | "extra": { 1023 | "branch-alias": { 1024 | "dev-master": "2.4-dev" 1025 | } 1026 | }, 1027 | "autoload": { 1028 | "psr-0": { 1029 | "Symfony\\Component\\Debug\\": "" 1030 | } 1031 | }, 1032 | "notification-url": "https://packagist.org/downloads/", 1033 | "license": [ 1034 | "MIT" 1035 | ], 1036 | "authors": [ 1037 | { 1038 | "name": "Fabien Potencier", 1039 | "email": "fabien@symfony.com" 1040 | }, 1041 | { 1042 | "name": "Symfony Community", 1043 | "homepage": "http://symfony.com/contributors" 1044 | } 1045 | ], 1046 | "description": "Symfony Debug Component", 1047 | "homepage": "http://symfony.com", 1048 | "time": "2014-01-07 13:28:54" 1049 | }, 1050 | { 1051 | "name": "symfony/dom-crawler", 1052 | "version": "2.4.x-dev", 1053 | "target-dir": "Symfony/Component/DomCrawler", 1054 | "source": { 1055 | "type": "git", 1056 | "url": "https://github.com/symfony/DomCrawler.git", 1057 | "reference": "fa7d0ca404202d4330075ac90c6c22c546753d64" 1058 | }, 1059 | "dist": { 1060 | "type": "zip", 1061 | "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/fa7d0ca404202d4330075ac90c6c22c546753d64", 1062 | "reference": "fa7d0ca404202d4330075ac90c6c22c546753d64", 1063 | "shasum": "" 1064 | }, 1065 | "require": { 1066 | "php": ">=5.3.3" 1067 | }, 1068 | "require-dev": { 1069 | "symfony/css-selector": "~2.0" 1070 | }, 1071 | "suggest": { 1072 | "symfony/css-selector": "" 1073 | }, 1074 | "type": "library", 1075 | "extra": { 1076 | "branch-alias": { 1077 | "dev-master": "2.4-dev" 1078 | } 1079 | }, 1080 | "autoload": { 1081 | "psr-0": { 1082 | "Symfony\\Component\\DomCrawler\\": "" 1083 | } 1084 | }, 1085 | "notification-url": "https://packagist.org/downloads/", 1086 | "license": [ 1087 | "MIT" 1088 | ], 1089 | "authors": [ 1090 | { 1091 | "name": "Fabien Potencier", 1092 | "email": "fabien@symfony.com" 1093 | }, 1094 | { 1095 | "name": "Symfony Community", 1096 | "homepage": "http://symfony.com/contributors" 1097 | } 1098 | ], 1099 | "description": "Symfony DomCrawler Component", 1100 | "homepage": "http://symfony.com", 1101 | "time": "2014-01-07 13:28:54" 1102 | }, 1103 | { 1104 | "name": "symfony/event-dispatcher", 1105 | "version": "dev-master", 1106 | "target-dir": "Symfony/Component/EventDispatcher", 1107 | "source": { 1108 | "type": "git", 1109 | "url": "https://github.com/symfony/EventDispatcher.git", 1110 | "reference": "a37a9430e2eafb6a66de240ac13f91b45b4c3d37" 1111 | }, 1112 | "dist": { 1113 | "type": "zip", 1114 | "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/a37a9430e2eafb6a66de240ac13f91b45b4c3d37", 1115 | "reference": "a37a9430e2eafb6a66de240ac13f91b45b4c3d37", 1116 | "shasum": "" 1117 | }, 1118 | "require": { 1119 | "php": ">=5.3.3" 1120 | }, 1121 | "require-dev": { 1122 | "psr/log": "~1.0", 1123 | "symfony/dependency-injection": "~2.0", 1124 | "symfony/stopwatch": "~2.2" 1125 | }, 1126 | "suggest": { 1127 | "symfony/dependency-injection": "", 1128 | "symfony/http-kernel": "" 1129 | }, 1130 | "type": "library", 1131 | "extra": { 1132 | "branch-alias": { 1133 | "dev-master": "2.5-dev" 1134 | } 1135 | }, 1136 | "autoload": { 1137 | "psr-0": { 1138 | "Symfony\\Component\\EventDispatcher\\": "" 1139 | } 1140 | }, 1141 | "notification-url": "https://packagist.org/downloads/", 1142 | "license": [ 1143 | "MIT" 1144 | ], 1145 | "authors": [ 1146 | { 1147 | "name": "Fabien Potencier", 1148 | "email": "fabien@symfony.com" 1149 | }, 1150 | { 1151 | "name": "Symfony Community", 1152 | "homepage": "http://symfony.com/contributors" 1153 | } 1154 | ], 1155 | "description": "Symfony EventDispatcher Component", 1156 | "homepage": "http://symfony.com", 1157 | "time": "2014-01-07 13:29:57" 1158 | }, 1159 | { 1160 | "name": "symfony/filesystem", 1161 | "version": "dev-master", 1162 | "target-dir": "Symfony/Component/Filesystem", 1163 | "source": { 1164 | "type": "git", 1165 | "url": "https://github.com/symfony/Filesystem.git", 1166 | "reference": "e81f1b30eb9748c3f8e0de3a92ea210845cff0a9" 1167 | }, 1168 | "dist": { 1169 | "type": "zip", 1170 | "url": "https://api.github.com/repos/symfony/Filesystem/zipball/e81f1b30eb9748c3f8e0de3a92ea210845cff0a9", 1171 | "reference": "e81f1b30eb9748c3f8e0de3a92ea210845cff0a9", 1172 | "shasum": "" 1173 | }, 1174 | "require": { 1175 | "php": ">=5.3.3" 1176 | }, 1177 | "type": "library", 1178 | "extra": { 1179 | "branch-alias": { 1180 | "dev-master": "2.5-dev" 1181 | } 1182 | }, 1183 | "autoload": { 1184 | "psr-0": { 1185 | "Symfony\\Component\\Filesystem\\": "" 1186 | } 1187 | }, 1188 | "notification-url": "https://packagist.org/downloads/", 1189 | "license": [ 1190 | "MIT" 1191 | ], 1192 | "authors": [ 1193 | { 1194 | "name": "Fabien Potencier", 1195 | "email": "fabien@symfony.com" 1196 | }, 1197 | { 1198 | "name": "Symfony Community", 1199 | "homepage": "http://symfony.com/contributors" 1200 | } 1201 | ], 1202 | "description": "Symfony Filesystem Component", 1203 | "homepage": "http://symfony.com", 1204 | "time": "2014-01-07 13:29:57" 1205 | }, 1206 | { 1207 | "name": "symfony/finder", 1208 | "version": "2.4.x-dev", 1209 | "target-dir": "Symfony/Component/Finder", 1210 | "source": { 1211 | "type": "git", 1212 | "url": "https://github.com/symfony/Finder.git", 1213 | "reference": "b6735d1fc16da13c4c7dddfe78366a4a098cf011" 1214 | }, 1215 | "dist": { 1216 | "type": "zip", 1217 | "url": "https://api.github.com/repos/symfony/Finder/zipball/b6735d1fc16da13c4c7dddfe78366a4a098cf011", 1218 | "reference": "b6735d1fc16da13c4c7dddfe78366a4a098cf011", 1219 | "shasum": "" 1220 | }, 1221 | "require": { 1222 | "php": ">=5.3.3" 1223 | }, 1224 | "type": "library", 1225 | "extra": { 1226 | "branch-alias": { 1227 | "dev-master": "2.4-dev" 1228 | } 1229 | }, 1230 | "autoload": { 1231 | "psr-0": { 1232 | "Symfony\\Component\\Finder\\": "" 1233 | } 1234 | }, 1235 | "notification-url": "https://packagist.org/downloads/", 1236 | "license": [ 1237 | "MIT" 1238 | ], 1239 | "authors": [ 1240 | { 1241 | "name": "Fabien Potencier", 1242 | "email": "fabien@symfony.com" 1243 | }, 1244 | { 1245 | "name": "Symfony Community", 1246 | "homepage": "http://symfony.com/contributors" 1247 | } 1248 | ], 1249 | "description": "Symfony Finder Component", 1250 | "homepage": "http://symfony.com", 1251 | "time": "2014-01-07 13:28:54" 1252 | }, 1253 | { 1254 | "name": "symfony/http-foundation", 1255 | "version": "2.4.x-dev", 1256 | "target-dir": "Symfony/Component/HttpFoundation", 1257 | "source": { 1258 | "type": "git", 1259 | "url": "https://github.com/symfony/HttpFoundation.git", 1260 | "reference": "25b49c494ea6aed2cfd8448ae3f8437d01e731eb" 1261 | }, 1262 | "dist": { 1263 | "type": "zip", 1264 | "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/25b49c494ea6aed2cfd8448ae3f8437d01e731eb", 1265 | "reference": "25b49c494ea6aed2cfd8448ae3f8437d01e731eb", 1266 | "shasum": "" 1267 | }, 1268 | "require": { 1269 | "php": ">=5.3.3" 1270 | }, 1271 | "type": "library", 1272 | "extra": { 1273 | "branch-alias": { 1274 | "dev-master": "2.4-dev" 1275 | } 1276 | }, 1277 | "autoload": { 1278 | "psr-0": { 1279 | "Symfony\\Component\\HttpFoundation\\": "" 1280 | }, 1281 | "classmap": [ 1282 | "Symfony/Component/HttpFoundation/Resources/stubs" 1283 | ] 1284 | }, 1285 | "notification-url": "https://packagist.org/downloads/", 1286 | "license": [ 1287 | "MIT" 1288 | ], 1289 | "authors": [ 1290 | { 1291 | "name": "Fabien Potencier", 1292 | "email": "fabien@symfony.com" 1293 | }, 1294 | { 1295 | "name": "Symfony Community", 1296 | "homepage": "http://symfony.com/contributors" 1297 | } 1298 | ], 1299 | "description": "Symfony HttpFoundation Component", 1300 | "homepage": "http://symfony.com", 1301 | "time": "2014-01-07 13:28:54" 1302 | }, 1303 | { 1304 | "name": "symfony/http-kernel", 1305 | "version": "2.4.x-dev", 1306 | "target-dir": "Symfony/Component/HttpKernel", 1307 | "source": { 1308 | "type": "git", 1309 | "url": "https://github.com/symfony/HttpKernel.git", 1310 | "reference": "52e247c4d53d724b376a87abdacc04db5cc747d7" 1311 | }, 1312 | "dist": { 1313 | "type": "zip", 1314 | "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/52e247c4d53d724b376a87abdacc04db5cc747d7", 1315 | "reference": "52e247c4d53d724b376a87abdacc04db5cc747d7", 1316 | "shasum": "" 1317 | }, 1318 | "require": { 1319 | "php": ">=5.3.3", 1320 | "psr/log": "~1.0", 1321 | "symfony/debug": "~2.3", 1322 | "symfony/event-dispatcher": "~2.1", 1323 | "symfony/http-foundation": "~2.4" 1324 | }, 1325 | "require-dev": { 1326 | "symfony/browser-kit": "~2.2", 1327 | "symfony/class-loader": "~2.1", 1328 | "symfony/config": "~2.0", 1329 | "symfony/console": "~2.2", 1330 | "symfony/dependency-injection": "~2.0", 1331 | "symfony/finder": "~2.0", 1332 | "symfony/process": "~2.0", 1333 | "symfony/routing": "~2.2", 1334 | "symfony/stopwatch": "~2.2", 1335 | "symfony/templating": "~2.2" 1336 | }, 1337 | "suggest": { 1338 | "symfony/browser-kit": "", 1339 | "symfony/class-loader": "", 1340 | "symfony/config": "", 1341 | "symfony/console": "", 1342 | "symfony/dependency-injection": "", 1343 | "symfony/finder": "" 1344 | }, 1345 | "type": "library", 1346 | "extra": { 1347 | "branch-alias": { 1348 | "dev-master": "2.4-dev" 1349 | } 1350 | }, 1351 | "autoload": { 1352 | "psr-0": { 1353 | "Symfony\\Component\\HttpKernel\\": "" 1354 | } 1355 | }, 1356 | "notification-url": "https://packagist.org/downloads/", 1357 | "license": [ 1358 | "MIT" 1359 | ], 1360 | "authors": [ 1361 | { 1362 | "name": "Fabien Potencier", 1363 | "email": "fabien@symfony.com" 1364 | }, 1365 | { 1366 | "name": "Symfony Community", 1367 | "homepage": "http://symfony.com/contributors" 1368 | } 1369 | ], 1370 | "description": "Symfony HttpKernel Component", 1371 | "homepage": "http://symfony.com", 1372 | "time": "2014-01-20 06:30:15" 1373 | }, 1374 | { 1375 | "name": "symfony/process", 1376 | "version": "2.4.x-dev", 1377 | "target-dir": "Symfony/Component/Process", 1378 | "source": { 1379 | "type": "git", 1380 | "url": "https://github.com/symfony/Process.git", 1381 | "reference": "4f196b9d307d9e1a3d4372f1735c301c03d476c5" 1382 | }, 1383 | "dist": { 1384 | "type": "zip", 1385 | "url": "https://api.github.com/repos/symfony/Process/zipball/4f196b9d307d9e1a3d4372f1735c301c03d476c5", 1386 | "reference": "4f196b9d307d9e1a3d4372f1735c301c03d476c5", 1387 | "shasum": "" 1388 | }, 1389 | "require": { 1390 | "php": ">=5.3.3" 1391 | }, 1392 | "type": "library", 1393 | "extra": { 1394 | "branch-alias": { 1395 | "dev-master": "2.4-dev" 1396 | } 1397 | }, 1398 | "autoload": { 1399 | "psr-0": { 1400 | "Symfony\\Component\\Process\\": "" 1401 | } 1402 | }, 1403 | "notification-url": "https://packagist.org/downloads/", 1404 | "license": [ 1405 | "MIT" 1406 | ], 1407 | "authors": [ 1408 | { 1409 | "name": "Fabien Potencier", 1410 | "email": "fabien@symfony.com" 1411 | }, 1412 | { 1413 | "name": "Symfony Community", 1414 | "homepage": "http://symfony.com/contributors" 1415 | } 1416 | ], 1417 | "description": "Symfony Process Component", 1418 | "homepage": "http://symfony.com", 1419 | "time": "2014-01-07 13:28:54" 1420 | }, 1421 | { 1422 | "name": "symfony/routing", 1423 | "version": "2.4.x-dev", 1424 | "target-dir": "Symfony/Component/Routing", 1425 | "source": { 1426 | "type": "git", 1427 | "url": "https://github.com/symfony/Routing.git", 1428 | "reference": "e4ef317134f5628b5f0d3b0ac96d30ba1c8146cc" 1429 | }, 1430 | "dist": { 1431 | "type": "zip", 1432 | "url": "https://api.github.com/repos/symfony/Routing/zipball/e4ef317134f5628b5f0d3b0ac96d30ba1c8146cc", 1433 | "reference": "e4ef317134f5628b5f0d3b0ac96d30ba1c8146cc", 1434 | "shasum": "" 1435 | }, 1436 | "require": { 1437 | "php": ">=5.3.3" 1438 | }, 1439 | "require-dev": { 1440 | "doctrine/annotations": "~1.0", 1441 | "psr/log": "~1.0", 1442 | "symfony/config": "~2.2", 1443 | "symfony/expression-language": "~2.4", 1444 | "symfony/yaml": "~2.0" 1445 | }, 1446 | "suggest": { 1447 | "doctrine/annotations": "For using the annotation loader", 1448 | "symfony/config": "For using the all-in-one router or any loader", 1449 | "symfony/expression-language": "For using expression matching", 1450 | "symfony/yaml": "For using the YAML loader" 1451 | }, 1452 | "type": "library", 1453 | "extra": { 1454 | "branch-alias": { 1455 | "dev-master": "2.4-dev" 1456 | } 1457 | }, 1458 | "autoload": { 1459 | "psr-0": { 1460 | "Symfony\\Component\\Routing\\": "" 1461 | } 1462 | }, 1463 | "notification-url": "https://packagist.org/downloads/", 1464 | "license": [ 1465 | "MIT" 1466 | ], 1467 | "authors": [ 1468 | { 1469 | "name": "Fabien Potencier", 1470 | "email": "fabien@symfony.com" 1471 | }, 1472 | { 1473 | "name": "Symfony Community", 1474 | "homepage": "http://symfony.com/contributors" 1475 | } 1476 | ], 1477 | "description": "Symfony Routing Component", 1478 | "homepage": "http://symfony.com", 1479 | "keywords": [ 1480 | "router", 1481 | "routing", 1482 | "uri", 1483 | "url" 1484 | ], 1485 | "time": "2014-01-07 13:28:54" 1486 | }, 1487 | { 1488 | "name": "symfony/translation", 1489 | "version": "2.4.x-dev", 1490 | "target-dir": "Symfony/Component/Translation", 1491 | "source": { 1492 | "type": "git", 1493 | "url": "https://github.com/symfony/Translation.git", 1494 | "reference": "d08c27077115e4bd3030a812e4083daa49254ca9" 1495 | }, 1496 | "dist": { 1497 | "type": "zip", 1498 | "url": "https://api.github.com/repos/symfony/Translation/zipball/d08c27077115e4bd3030a812e4083daa49254ca9", 1499 | "reference": "d08c27077115e4bd3030a812e4083daa49254ca9", 1500 | "shasum": "" 1501 | }, 1502 | "require": { 1503 | "php": ">=5.3.3" 1504 | }, 1505 | "require-dev": { 1506 | "symfony/config": "~2.0", 1507 | "symfony/yaml": "~2.2" 1508 | }, 1509 | "suggest": { 1510 | "symfony/config": "", 1511 | "symfony/yaml": "" 1512 | }, 1513 | "type": "library", 1514 | "extra": { 1515 | "branch-alias": { 1516 | "dev-master": "2.4-dev" 1517 | } 1518 | }, 1519 | "autoload": { 1520 | "psr-0": { 1521 | "Symfony\\Component\\Translation\\": "" 1522 | } 1523 | }, 1524 | "notification-url": "https://packagist.org/downloads/", 1525 | "license": [ 1526 | "MIT" 1527 | ], 1528 | "authors": [ 1529 | { 1530 | "name": "Fabien Potencier", 1531 | "email": "fabien@symfony.com" 1532 | }, 1533 | { 1534 | "name": "Symfony Community", 1535 | "homepage": "http://symfony.com/contributors" 1536 | } 1537 | ], 1538 | "description": "Symfony Translation Component", 1539 | "homepage": "http://symfony.com", 1540 | "time": "2014-01-07 13:28:54" 1541 | } 1542 | ], 1543 | "packages-dev": [ 1544 | 1545 | ], 1546 | "aliases": [ 1547 | 1548 | ], 1549 | "minimum-stability": "dev", 1550 | "stability-flags": [ 1551 | 1552 | ], 1553 | "platform": [ 1554 | 1555 | ], 1556 | "platform-dev": [ 1557 | 1558 | ] 1559 | } 1560 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | ./app/tests/ 16 | 17 | 18 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes... 9 | RewriteRule ^(.*)/$ /$1 [L,R=301] 10 | 11 | # Handle Front Controller... 12 | RewriteCond %{REQUEST_FILENAME} !-d 13 | RewriteCond %{REQUEST_FILENAME} !-f 14 | RewriteRule ^ index.php [L] 15 | 16 | -------------------------------------------------------------------------------- /public/css/styles.css: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Exo+2:300,500,600,600italic,900italic); 2 | 3 | body { 4 | min-height: 800px; 5 | font-family: 'Exo 2', 'Helvetica Neue', Helvetica, sans-serif; 6 | font-weight: 300; 7 | font-size: 18px; 8 | } 9 | 10 | h1 { 11 | font-family: 'Exo 2', 'Helvetica Neue', Helvetica, sans-serif; 12 | font-weight: 600; 13 | } 14 | 15 | h2, h3, h4, h5 { 16 | font-family: 'Exo 2', 'Helvetica Neue', Helvetica, sans-serif; 17 | font-weight: 500; 18 | } 19 | 20 | em { 21 | color: orange; 22 | } 23 | 24 | .container { 25 | width: 970px !important; 26 | } 27 | 28 | .navbar-brand { 29 | font-family: 'Exo 2', 'Helvetica Neue', Helvetica, sans-serif; 30 | font-weight: 900; 31 | font-style: italic; 32 | } 33 | 34 | .sidebar { 35 | padding-top: 15px; 36 | padding-bottom: 15px; 37 | border: 1px solid rgb(231, 231, 231); 38 | background-color: rgb(248, 248, 248); 39 | } 40 | 41 | .sidebar .search { margin-bottom: 15px; } 42 | 43 | .footer { 44 | height: 75px; 45 | margin-top: 30px; 46 | line-height: 75px; 47 | text-align: center; 48 | color: #666; 49 | background-color: #222; 50 | } 51 | 52 | 53 | /* Post styles */ 54 | 55 | .post .meta { 56 | height: 36px; 57 | padding: 5px 8px; 58 | background-color: #fafafa; 59 | border-radius: 2px; 60 | } 61 | 62 | .post .tags { 63 | line-height: 20px; 64 | } 65 | 66 | .post .tags a:hover { text-decoration: none; } 67 | 68 | .post .tags .label { 69 | line-height: 20px; 70 | font-size: 0.6em; 71 | font-weight: normal; 72 | } 73 | 74 | .post .tags .label.php { background-color: #428BCA; } 75 | .post .tags .label.mysql { background-color: #5CB85C; } 76 | .post .tags .label.mongodb { background-color: #5BC0DE; } 77 | .post .tags .label.html { background-color: #F0AD4E; } 78 | .post .tags .label.css { background-color: #D9534F; } 79 | .post .tags .label.javascript { background-color: #463265; } 80 | 81 | .post footer { margin-top: 30px; } 82 | 83 | .post footer .thumbnail { 84 | max-width: 100px; 85 | max-height: 100px; 86 | margin: 0 15px 0 0; 87 | } 88 | 89 | /* Author Styles */ 90 | 91 | .author .thumbnail { 92 | max-width: 100px; 93 | max-height: 100px; 94 | margin: 0 15px 0 0; 95 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtrenz/laravel-model-demo/ce0347b9abb046e9b9dea3646f70970136379078/public/favicon.ico -------------------------------------------------------------------------------- /public/images/code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtrenz/laravel-model-demo/ce0347b9abb046e9b9dea3646f70970136379078/public/images/code.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | /* 10 | |-------------------------------------------------------------------------- 11 | | Register The Auto Loader 12 | |-------------------------------------------------------------------------- 13 | | 14 | | Composer provides a convenient, automatically generated class loader 15 | | for our application. We just need to utilize it! We'll require it 16 | | into the script here so that we do not have to worry about the 17 | | loading of any our classes "manually". Feels great to relax. 18 | | 19 | */ 20 | 21 | require __DIR__.'/../bootstrap/autoload.php'; 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Turn On The Lights 26 | |-------------------------------------------------------------------------- 27 | | 28 | | We need to illuminate PHP development, so let's turn on the lights. 29 | | This bootstraps the framework and gets it ready for use, then it 30 | | will load up this application so that we can run it and send 31 | | the responses back to the browser and delight these users. 32 | | 33 | */ 34 | 35 | $app = require_once __DIR__.'/../bootstrap/start.php'; 36 | 37 | /* 38 | |-------------------------------------------------------------------------- 39 | | Run The Application 40 | |-------------------------------------------------------------------------- 41 | | 42 | | Once we have the application, we can simply call the run method, 43 | | which will execute the request and send the response back to 44 | | the client's browser allowing them to enjoy the creative 45 | | and wonderful application we have whipped up for them. 46 | | 47 | */ 48 | 49 | $app->run(); 50 | -------------------------------------------------------------------------------- /public/packages/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtrenz/laravel-model-demo/ce0347b9abb046e9b9dea3646f70970136379078/public/packages/.gitkeep -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 'Illuminate\Routing\Controllers\Controller',` 15 | to use `Illuminate\Routing\Controller`. 16 | - in `providers` add `'Illuminate\Remote\RemoteServiceProvider',`. 17 | - in `aliases` add `'SSH' => 'Illuminate\Support\Facades\SSH',`. 18 | - If `app/controllers/BaseController.php` has a use statement at the top, change `use Illuminate\Routing\Controllers\Controller;` to `use Illuminate\Routing\Controller;`. You may also remove this use statament, for you have registered a class alias for this. 19 | - If you are overriding `missingMethod` in your controllers, add $method as the first parameter. 20 | - Password reminder system tweaked for greater developer freedom. Inspect stub controller by running `auth:reminders-controller` Artisan command. 21 | - Update `reminders.php` language file to match [this](https://github.com/laravel/laravel/blob/master/app/lang/en/reminders.php) file. 22 | - If you are using http hosts to set the $env variable in bootstrap/start.php, these should be changed to machine names (as returned by PHP's gethostname() function). 23 | 24 | Finally, 25 | 26 | - Run `composer update` 27 | --------------------------------------------------------------------------------