-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started
This documentation describes how to use conForm and configure it using the Vue Cli and Laravel.
- Composer 1.x.x
- XAMPP Recommended if you want a all-in-one solution with Apache distribution containing MariaDB, PHP (recommended for setting up the application without Docker)
- Node 12.xx + NPM 6.xx
You can check if the installation was a success by running the following commands in the command line:
node --version && npm --version
&&composer --version
It may work with older versions, but it was never tested with any other versions.
If you encounter any problems during setting up the application without Docker, check out our Troubleshoot section.
Start your XAMPP control panel and click on admin in the mysql section, enter your database credentials and add a new database (refer to your .env for correct credentials)
cd ..\laravel-conForm
cp .env.example.without_docker .env
Laravel makes connecting with databases and running queries extremely simple. The .env file is the entry point of your application. In this file you may define all of your database connections, as well as specify which connection should be used by default. Laravel supports four database systems: MySQL, Postgres, SQLite, and SQL Server.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=<the name of your database>
DB_USERNAME=root
DB_PASSWORD=
-
DB_CONNECTION
: The adapter we are using for our project. By default Laravel queues mysql if no other adapter is specified. You may specify it in your /config/database.php file -
DB_HOST
: Host of Database. Most likelylocalhost
-
DB_NAME
: Name of your Database. Choose here what ever you want and keep in mind to update your .env correctly. If you use our Docker-Image, this will beapp
-
DB_USERNAME
,DB_PASSWORD
: Username & Password of the Database (Username defaults to root and password is empty) -
DB_PORT
: Port the Database is running on.3306
is the default mysql-port.
cd ..\laravel-conForm
npm install
composer install
php artisan key:generate
-
php artisan migrate
(refer to the seed section below before migrating) php artisan passport:install
php artisan storage:link
php artisan config:cache
npm run watch
php artisan serve
Laravel includes the ability to seed your database with test data using seed classes. So you may want to use
php artisan migrate --seed
instead and inserting an admin user into the database by default.
A seeder class only contains one method by default: run. This method is called when the db:seed Artisan command is executed. Within the run method, you may insert data into your database however you wish.
public function run()
{
User::create([
'name' => 'Armin',
'email' => '[email protected]',
'password' => bcrypt('password'),
'role' => 'adminstrator'
]);
}
Laravel documentation is available here
If you encounter any problems during setting up the application with Docker, check out our Troubleshoot section.
- Setup Docker on your machine and run these commands:
cd ..\laravel-conForm
cp .env.example_with_docker .env
docker-compose up -d
❗ You have to give permissions to /storage/logs and /storage/framework |
---|
chmod 777 -R storage/logs
chmod 777 -R storage/framework
If you want to achieve something alike CHMOD (which is a UNIX/Linux command only, used to change file permissions), you need to right-click the
file/folder you want to change permissions for, then Properties and then Security
There you’ll see all users having permissions on that file/folder and what their permissions are. These folders should be granted everything for
everyone.
Right click on \storage\logs and \storage\frameworks, go to Reveal in File Explorer
Right click on Properties and then go to Security
Grant permission everything for everyone
- Before running the next command, make sure to wait until your composer finished downloading and installing the packages - this may take some time depending on your internet connection. You can check the status in the logs of your composer container in Docker
docker restart setup
http://127.0.0.1/ or http://localhost
A detailed setup guide with docker can be found here.
- Package Manager: NPM and NodeJS
- Dependency managment: Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.