在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):andrewelkins/Laravel-4-Bootstrap-Starter-Site开源软件地址(OpenSource Url):https://github.com/andrewelkins/Laravel-4-Bootstrap-Starter-Site开源编程语言(OpenSource Language):JavaScript 58.3%开源软件介绍(OpenSource Introduction):#Laravel 4 Bootstrap Starter Site Laravel 4 Bootstrap Starter Site is a sample application for beginning development with Laravel 4. Features
IssuesSee github issue list for current list. RecommendationsI recommend that you use Grunt to compile and minify your assets. See this article for details. Also I recommend using Former for your forms. It's an excellent library. ##Requirements
Installation instructions for the mcrypt extension are available here. ##How to install Step 1: Get the codeOption 1: Git Clone$ git clone git://github.com/andrewelkins/Laravel-4-Bootstrap-Starter-Site.git laravel Option 2: Download the repository
Step 2: Use Composer to install dependenciesOption 1: Composer is not installed globally$ cd laravel
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install Option 2: Composer is installed globally$ cd laravel
$ composer install If you haven't already, you might want to make composer be installed globally for future ease of use. Some packages used to preprocess and minify assests are required on the development environment. When you deploy your project on a production environment you will want to upload the composer.lock file used on the development environment and only run This will skip the development packages and ensure the version of the packages installed on the production server match those you developped on. NEVER run Step 3: Configure EnvironmentsOpen bootstrap/start.php and edit the following lines to match your settings. You want to be using your machine name in Windows and your hostname in OS X and Linux (type $env = $app->detectEnvironment(array(
'local' => array('your-local-machine-name'),
'staging' => array('your-staging-machine-name'),
'production' => array('your-production-machine-name'),
)); Now create the folder inside app/config that corresponds to the environment the code is deployed in. This will most likely be local when you first start a project. You will now be copying the initial configuration file inside this folder before editing it. Let's start with app/config/app.php. So app/config/local/app.php will probably look something like this, as the rest of the configuration can be left to their defaults from the initial config file: <?php
return array(
'url' => 'http://myproject.local',
'timezone' => 'UTC',
'key' => 'YourSecretKey!!!',
'providers' => append_config( array(
/* Uncomment for use in development */
//'Way\Generators\GeneratorsServiceProvider', // Generators
//'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider', // IDE Helpers
)
),
); Step 4: Configure DatabaseNow that you have the environment configured, you need to create a database configuration for it. Copy the file app/config/database.php in app/config/local and edit it to match your local database settings. You can remove all the parts that you have not changed as this configuration file will be loaded over the initial one. Step 5: Configure MailerIn the same fashion, copy the app/config/mail.php configuration file in app/config/local/mail.php. Now set the Step 6: Populate DatabaseRun these commands to create and populate Users table: $ php artisan migrate
$ php artisan db:seed Step 7: Set Encryption KeyIn app/config/app.php
'key' => 'YourSecretKey!!!', You can use artisan to do this $ php artisan key:generate --env=local The Step 8: Make sure app/storage is writable by your web server.If permissions are set correctly: $ chmod -R 775 app/storage Should work, if not try $ chmod -R 777 app/storage Step 9: Start Page (Three options for proceeding)User login with commenting permissionNavigate to your Laravel 4 website and login at /user/login:
Create a new userCreate a new user at /user/create Admin loginNavigate to /admin
Application StructureThe structure of this starter site is the same as default Laravel 4 with one exception.
This starter site adds a Detect LanguageIf you want to detect the language on all pages you'll want to add the following to your routes.php at the top. Route::when('*','detectLang'); DevelopmentFor ease of development you'll want to enable a couple useful packages. This requires editing the 'providers' => array(
[...]
/* Uncomment for use in development */
// 'Way\Generators\GeneratorsServiceProvider', // Generators
// 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider', // IDE Helpers
), Uncomment the Generators and IDE Helpers. Then you'll want to run a composer update with the dev flag. $ php composer.phar update This adds the generators and ide helpers.
To make it build the ide helpers automatically you'll want to modify the post-update-cmd in "post-update-cmd": [
"php artisan ide-helper:generate",
"php artisan optimize"
] Production LaunchBy default debugging is enabled. Before you go to production you should disable debugging in
TroubleshootingComposer asking for login / passwordTry using this with doing the install instead. $ composer install --dev --prefer-source --no-interaction LicenseThis is free software distributed under the terms of the MIT license Additional informationInspired by and based on laravel4-starter-kit Any questions, feel free to contact me. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论