Make sure to install:
-
PHP mcrypt extension : http://www.coolestguidesontheplanet.com/how-to-install-mcrypt-for-php-on-mac-osx-lion-10-7-development-server/
-
setup your apache virtual host file. located in /etc/apache2/extra/httpd-vhosts.conf
e.g.:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/projects/laravel-restful/public"
ServerName api.dev
ServerAlias www.api.dev
<Directory "/projects/laravel-restful/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog "/private/var/log/apache2/api.dev-error_log"
CustomLog "/private/var/log/apache2/api.dev-access_log" common
</VirtualHost>
-
add the local host to /etc/hosts e.g.: 127.0.0.1 api.dev www.api.dev
-
make sure root folder is owned by apache2 user / group
-
make sure /app/storage folder is writable to web server user / group
-
go to app/config $ cp database.php.example database.php
-
edit the database configuration file, and fill up the password for mysql entry
-
create database called api_db in your local mysql server
-
make sure your php uses mysqlnd as mysql driver (laravel DB::raw requires it)
-
create a file bootstrap/env.php and return the environment name if its not a production environment
-
run migration $ php artisan migrate
-
run seeds $ php artisan db:seed
A javascript single page application (SPA).
- NodeJS for development platform
- GruntJS for tooling
- JSHint for code quality
- LESS for CSS preprocessor and framework
- Bower for package management
- JQuery for DOM helper
- UnderscoreJS for utility helper
- AngularJS for MVW framework
- RequireJS for module loader
- Install NodeJS and NPM - (http://www.nodejs.org)
- Install LESS
$ sudo npm install -g less - Install Bower
$ sudo npm install -g bower - Install grunt-cli
$ sudo npm install -g grunt-cli
$ sudo npm install -g grunt-init - Install Node modules dependencies from package.json
$ npm install - Install components dependencies from components.json
$ bower install
Note: if you're running trouble installing, try with sudo and --allow-root option
$ grunt run
- Updating composer packages without memory limit
$ php -d memory_limit=-1 /usr/local/bin/composer update - Remove migration
``
I did not run (php artisan migrate) the migration, so I decided to remove it. My steps: - Manually delete the migration file under app/database/migrations/my_migration_file_name.php
- Reset the composer autoload files: composer dump-autoload
- Relax
If you did run the migration (php artisan migrate), you may do this:
- Manually delete the migration file under app/database/migrations/my_migration_file_name.php
- Reset the composer autoload files: composer dump-autoload
- Modify your database: Remove the last entry from the migrations table ``