An app for a hair salon. Allows the owner to add a list of their stylists, and for each stylist, add clients who see that stylist. Names can also be updated or deleted.
##Setup
- Clone this repository using the command
git clone https://github.com/anniehoogendoorn/HairSalon.git
. - Change directory into the top level of the project folder.
- Install Composer (https://getcomposer.org) and then run the command
composer install
to download the Silex and Twig vendor files. - Change directory into the
web
folder and start your server. For example, using PHP’s built-in server:php -S localhost:8000
- Navigate your browser to the home page at the root address. For example:
http://localhost:8000
.
To recreate the hair_salon database in MySql follow these steps:
- At Epicodus, open the bash terminal and run:
mysql.server start
followed by the command:mysql -uroot -proot
If you're working with MAMP, once you've started the servers,
you can access your MySQL terminal by entering:
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
- In the terminal, type:
> CREATE DATABASE hair_salon;
> USE hair_salon;
> CREATE TABLE stylists (id serial PRIMARY KEY, name VARCHAR (255));
> CREATE TABLE clients (id serial PRIMARY KEY, name VARCHAR (255), stylist_id INT);
To recreate the Mysql hair_salon_test database, follow these steps:
- On your home computer, open MAMP and click "Start Servers". On Epicodus computers, in the Bash terminal enter:
$ apachectl start
- Use your browser to open
localhost:8888/phpmyadmin
, or if you're at Epicoduslocalhost:8080/phpmyadmin
. - On the left sidebar of the phpMyAdmin screen select the
hair_salon
database and a new screen will appear. This view shows us our tables. - Select Operations from the tabs at the top of the screen.
- In the box labelled
Copy database to:
we enter the name of our new database: hair_salon_test. - Click Go and you'll see a new database has appeared in the sidebar called
hair_salon_test
.
HTML Twig Silex PHP MySql
Copyright (c) 2015 Annie Hoogendoorn
This software is licensed under the MIT license.
Permission is hereby granted, on a donation basis, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.