Laravel 4 Starter Site is a basic blog application using several nice community packages.
#Laravel 4 - Bootstrap Starter Site (Version 1.0.2 Stable)
This is a Laravel 4 Starter Site. It is a fork off of brunogaspar/laravel4-starter-kit taking the starter kit changing the included modules and adding a few as well.
##Included features
See github issue list for current list.
(Checkout develop branch for latest unstable code.)
##Requirements
PHP >= 5.4.0 (Entrust requires 5.4, this is an increase over Laravel's 5.3.7 requirement)
MCrypt PHP Extension
##How to install
git clone git://github.com/andrew13/Laravel-4-Bootstrap-Starter-Site.git laravel
https://github.com/andrew13/Laravel-4-Bootstrap-Starter-Site/archive/master.zip
cd laravel
curl -s http://getcomposer.org/installer | php
php composer.phar install
cd laravel
composer install
If you haven’t already, you might want to make composer be installed globally for future ease of use.
Now that you have the Laravel 4 installed, you need to create a database for it and update the file app/config/database.php
Set the address and name from the from array in config/mail.php. Those will be used to send account confirmation and password reset emails to the users.
If you don’t set that registration will fail because it cannot send the confirmation email.
Run these commands to create and populate Users table:
php artisan migrate
php artisan db:seed
In app/config/app.php
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, long string, otherwise these encrypted values will not
| be safe. Make sure to change it before deploying any application!
|
*/
'key' => 'YourSecretKey!!!',
You can use artisan to do this
php artisan key:generate
If permissions are set correctly:
chmod -R 775 app/storage
Should work, if not try
chmod -R 777 app/storage
Navigate to your Laravel 4 website and login at /user/login:
username : user
password : user
Create a new user at /user/create
Navigate to /admin
username: admin
password: admin
Used for the user auth and registration. In general for user controllers you’ll want to use something like the following:
<?php
use Zizaco\Confide\ConfideUser;
class User extends ConfideUser {
}
For full usage see Zizaco/Confide Documentation
Entrust provides a flexible way to add Role-based Permissions to Laravel4.
<?php
use Zizaco\Entrust\EntrustRole;
class Role extends EntrustRole
{
}
For full usage see Zizaco/Entrust Documentation
Self-validating, secure and smart models for Laravel 4’s Eloquent ORM
For full usage see Ardent Documentation
A fluent extension to PHPs DateTime class.
<?php
$date = new ExpressiveDate;
$date->minusOneDay();
echo $date->getRelativeDate(); // 1 day ago
$date->addOneWeek();
echo $date->getShortDate(); // Jan 31, 2012
For full usage see Using Expressive Date by Jason Lewis
A Better Asset Management package for Laravel.
Adding assets in the configuration file config/packages/jasonlewis/basset/config.php
'collections' => array(
'public-css' => function($collection)
{
$collection->add('assets/css/bootstrap.min.css');
$collection->add('assets/css/bootstrap-responsive.min.css');
},
),
Compiling assets
$ php artisan basset:compile
For full usage see Using Basset by Jason Lewis
Simple presenter to wrap and render objects. Think of it of a way to modify an asset for the view layer only.
Control the presentation in the presentation layer not in the model.
The core idea is the relationship between two classes: your model full of data and a presenter which works as a sort of wrapper to help with your views.
For instance, if you have a User object you might have a UserPresenter presenter to go with it. To use it all you do is $userObject = new UserPresenter($userObject);.
The $userObject will function the same unless a method is called that is a member of the UserPresenter. Another way to think of it is that any call that doesn’t exist in the UserPresenter falls through to the original object.
For full usage see Presenter Readme
Laravel 4 Generators package provides a variety of generators to speed up your development process. These generators include:
generate:modelgenerate:seedgenerate:testgenerate:viewgenerate:migrationgenerate:resourceFor full usage see Laravel 4 Generators Readme
This is free software distributed under the terms of the MIT license
Inspired by and based on laravel4-starter-kit
Any questions, feel free to contact me.