#GGC-Talk
- [How to setup development environment in Windows](#How to setup development environment in Windows)
- [Editing the project](#Editing the project)
- Troubleshooting
- Packages
- Download and install WAMP
- Clone this repository in your WAMP www folder (i.e.
c:\wamp\www
) - Download and install Composer (use the Windows Installer)
- Remove semi-colon in front of
extension=php_openssl.dll
line in thec:\wamp\bin\php\php5.4.12\php.ini
file - Open terminal and type
composer install
in thec:\wamp\www\ggc-talk
folder - Open a browser and type
localhost/ggc-talk/public
in the url bar
- Download and install Aptana Studio 3
- Start Aptana Studio
- Click on
File
thenImport
- Select
Existing Projects into Workspace
then select theggc-talk
repository
Route::group(array('before' => 'auth'), function() {
// insert route that can only be accessed by a logged in user
});
Route::group(array('before' => 'guest'), function() {
// insert route that can only be accessed by a non-logged in user
});
You might want to use this to keep users from going to a route directly via URL. For example, if you had the login route under the guest filter, any logged in users going to the login URL will be redirected to the home page.
@if(Auth::user() -> role == 'Admin')
<!-- insert admin specific html code here -->
@endif
You can access a logged in user's attributes to display or check against. The example above accesses the user's role. In addition to role, you can access id, email (though email and id are the same), first_name, and last_name.
Auth::check()
// This returns true if the user is logged in
Auth::guest()
// This returns true if the user is not logged in
You might want to use this for a specific element that you only want admins to see. For example, you might want admins to be able to see a button to delete comments on the gallery page, but you wouldn't want standard users to see the button.
Additional documentation on the Laravel Authentication system: http://laravel.com/docs/security
- Where do I set my Database Configuration?
Database configurations are found in Database configurations: ggc-talk/app/config/database.php
Make sure the configurations are pointed too the MYSQL instance that you have set up.
- I set up composer and I still can't run the application!?
on the command line, make sure you run the command: php artisan migrate
This command updates your MySQL database changes so that you have a Database Version control. Basically, it makes sure your database is up to date.
- I added a new custom class but Laravel can't see it!?
Please make sure to run the command 'composer dump-autoload' in the root of the application. Alternatively, you can explicityly add a directory to the ClassLoader::addDirectories in the app/start/Global.php file.
ClassLoader::addDirectories(array(
app_path().'/commands',
app_path().'/controllers',
app_path().'/models',
app_path().'/database/seeds',
app_path().'/MyClassFolderGoesHere'
));
Packages are the primary way of adding functionality to Laravel.
-
Ardent
Description:Self validation for Models. -
Laravel4Generators
Description: extends php artisan generate command for faster workflow and uniform coding standard.